MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / process_quick_metric

Function process_quick_metric

benchmarks/quick_benchmark.py:561–571  ·  view source on GitHub ↗
(
        metric_attribute_name: str,
        metric_name: str,
        metric_header: str,
    )

Source from the content-addressed store, hash-verified

559 """
560
561 def process_quick_metric(
562 metric_attribute_name: str,
563 metric_name: str,
564 metric_header: str,
565 ):
566 if metric_attribute_name not in selected_percentile_metrics:
567 return
568 print("{s:{c}^{n}}".format(s=metric_header, n=50, c="-"))
569 mean_value = getattr(metrics, f"mean_{metric_attribute_name}_ms")
570 print("{:<40} {:<10.2f}".format(f"Mean {metric_name} (ms):", mean_value))
571 quick_result[f"mean_{metric_attribute_name}_ms"] = mean_value
572
573 def process_quick_length(
574 metric_attribute_name: str,

Callers 1

quick_summaryFunction · 0.85

Calls 2

printFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected