Lines Matching refs:f
76 self.info(f' {authority}...')
79 self.info(f'{ipv}...')
88 f'--{ipv}', f'https://{authority}/'
95 errors.append(f'exit={r.exit_code}')
96 props[authority][f'{ipv}-connect'] = mean(c_samples) \
98 props[authority][f'{ipv}-handshake'] = mean(hs_samples) \
100 props[authority][f'{ipv}-errors'] = errors
118 fname = f'score{label}.data'
127 error += f'exit={r.exit_code} '
129 error += f'stats={len(r.stats)}/{count} '
132 error += f'{len(fails)} failed'
169 url = f'{url}?[0-{count - 1}]'
199 url = f'{url}?[0-{count - 1}]'
229 self.info(f' {count}x{label}: ')
243 fname = f'score{label}.data'
244 url = f'https://{self.env.domain1}:{self.server_port}/{fname}'
251 error += f'exit={r.exit_code} '
253 error += f'stats={len(r.stats)}/{count} '
256 error += f'{len(fails)} failed'
257 for f in fails:
258 error += f'[{f["response_code"]}]'
294 url = f'{url}?id=[0-{count - 1}]'
323 url = f'{url}?id=[0-{count - 1}]'
351 self.info(f' {count}x{label}: ')
363 url = f'https://{self.env.domain2}:{self.server_port}/curltest/put'
367 fname = f'upload{label}.data'
381 url = f'{url}?[0-{count - 1}]'
389 self.info(f'{max_parallel}...')
397 errors.append(f'exit={r.exit_code}')
405 errors.append(f'responses != 200: {non_200s}')
416 self.info(f' {url}: ')
425 url = f'https://{self.env.domain1}:{self.server_port}/reqs10.data'
439 self.info(f"scoring {self.protocol} against {self.server_descr}\n")
463 raise ScoreCardError(f"unknown protocol: {self.protocol}")
466 raise ScoreCardError(f'did not recognized {p} lib')
489 return f'{int(tval*1000)} ms' if tval >= 0 else '--'
493 return f'{val / (1024*1024*1024):0.000f}GB'
495 return f'{val / (1024*1024):0.000f}MB'
497 return f'{val / 1024:0.000f}KB'
499 return f'{val:0.000f}B'
502 return f'{val/(1024*1024):0.000f} MB/s' if val >= 0 else '--'
505 return f'{val:0.000f} r/s' if val >= 0 else '--'
508 print(f'{score["protocol"]["name"].upper()} in {score["curl"]}')
510 print(f'{"Handshakes":<24} {"ipv4":25} {"ipv6":28}')
511 print(f' {"Host":<17} {"Connect":>12} {"Handshake":>12} '
512 f'{"Connect":>12} {"Handshake":>12} {"Errors":<20}')
514 print(f' {key:<17} {self.fmt_ms(val["ipv4-connect"]):>12} '
515 f'{self.fmt_ms(val["ipv4-handshake"]):>12} '
516 f'{self.fmt_ms(val["ipv6-connect"]):>12} '
517 f'{self.fmt_ms(val["ipv6-handshake"]):>12} '
518 f'{"/".join(val["ipv4-errors"] + val["ipv6-errors"]):<20}'
535 m_names[mkey] = f'{mkey}({mval["count"]}x{mval["max-parallel"]})'
536 print(f'Downloads from {score["server"]}')
537 print(f' {"Size":>8}', end='')
539 print(f' {m_names[m]:>{mcol_width}} {"[cpu/rss]":<{mcol_sw}}', end='')
540 print(f' {"Errors":^20}')
544 print(f' {size:>8}', end='')
551 print(f' {self.fmt_mbs(size_score[m]["speed"]):>{mcol_width}}', end='')
552 s = f'[{size_score[m]["stats"]["cpu"]:>.1f}%'\
553 f'/{self.fmt_size(size_score[m]["stats"]["rss"])}]'
554 print(f' {s:<{mcol_sw}}', end='')
558 print(f' {"/".join(errors):<20}')
560 print(f' {"-":^20}')
577 m_names[mkey] = f'{mkey}({mval["count"]}x{mval["max-parallel"]})'
579 print(f'Uploads to {score["server"]}')
580 print(f' {"Size":>8}', end='')
582 print(f' {m_names[m]:>{mcol_width}} {"[cpu/rss]":<{mcol_sw}}', end='')
583 print(f' {"Errors":^20}')
587 print(f' {size:>8}', end='')
594 print(f' {self.fmt_mbs(size_score[m]["speed"]):>{mcol_width}}', end='')
597 s = f'[{stats["cpu"]:>.1f}%/{self.fmt_size(stats["rss"])}]'
600 print(f' {s:<{mcol_sw}}', end='')
604 print(f' {"/".join(errors):<20}')
606 print(f' {"-":^20}')
622 m_names[mkey] = f'{mkey}'
625 print(f' {"Size":>6} {"Reqs":>6}', end='')
627 print(f' {m_names[m]:>{mcol_width}} {"[cpu/rss]":<{mcol_sw}}', end='')
628 print(f' {"Errors":^10}')
633 print(f' {size:>6} {count:>6}', end='')
640 print(f' {self.fmt_reqs(size_score[m]["speed"]):>{mcol_width}}', end='')
641 s = f'[{size_score[m]["stats"]["cpu"]:>.1f}%'\
642 f'/{self.fmt_size(size_score[m]["stats"]["rss"])}]'
643 print(f' {s:<{mcol_sw}}', end='')
647 print(f' {"/".join(errors):<10}')
649 print(f' {"-":^10}')
655 raise Exception(f'unrecognized size: {s}')
759 raise ScoreCardError(f'unable to parse ip:port from --remote {args.remote}')
766 server_descr=f'Server at {args.remote}',
776 f'httpd not found: {env.httpd}'
784 …server_descr = f'nghttpx: https:{env.h3_port} [backend httpd: {env.httpd_version()}, https:{env.ht…
787 … server_descr = f'httpd: {env.httpd_version()}, http:{env.http_port} https:{env.https_port}'
801 … backend = f' [backend httpd: {env.httpd_version()}, http:{env.http_port} https:{env.https_port}]'
804 f'httpd not found: {env.httpd}'
810 …server_descr = f'Caddy: {env.caddy_version()}, http:{env.caddy_http_port} https:{env.caddy_https_p…
825 print(f'{card.server_descr}')
844 sys.stderr.write(f"ERROR: {ex}\n")