Loading src/common/method_wrappers/Decorator.py +4 −4 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ class MetricsPool: if field_name == '_bucket': bucket_bounds.add(labels['le']) if len(labels) > 0: field_name = '{:s}:{:s}'.format(field_name, json.dumps(labels, sort_keys=True)) metric_data[field_name] = value print('method_to_metric_fields', method_to_metric_fields) #print('method_to_metric_fields', method_to_metric_fields) def sort_stats_key(item : List) -> float: str_duration = str(item[0]) Loading @@ -118,12 +118,12 @@ class MetricsPool: for f in ['Method']: pt_stats.align[f] = 'l' for method_name,metrics in method_to_metric_fields.items(): counter_started_value = int(metrics['STARTED']['_total']) counter_started_value = int(metrics['REQUESTS_STARTED']['_total']) if counter_started_value == 0: #pt_stats.add_row([method_name, '---', '---', '---', '---']) continue counter_completed_value = int(metrics['COMPLETED']['_total']) counter_failed_value = int(metrics['FAILED']['_total']) counter_completed_value = int(metrics['REQUESTS_COMPLETED']['_total']) counter_failed_value = int(metrics['REQUESTS_FAILED']['_total']) duration_count_value = float(metrics['DURATION']['_count']) duration_sum_value = float(metrics['DURATION']['_sum']) duration_avg_value = duration_sum_value/duration_count_value Loading Loading
src/common/method_wrappers/Decorator.py +4 −4 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ class MetricsPool: if field_name == '_bucket': bucket_bounds.add(labels['le']) if len(labels) > 0: field_name = '{:s}:{:s}'.format(field_name, json.dumps(labels, sort_keys=True)) metric_data[field_name] = value print('method_to_metric_fields', method_to_metric_fields) #print('method_to_metric_fields', method_to_metric_fields) def sort_stats_key(item : List) -> float: str_duration = str(item[0]) Loading @@ -118,12 +118,12 @@ class MetricsPool: for f in ['Method']: pt_stats.align[f] = 'l' for method_name,metrics in method_to_metric_fields.items(): counter_started_value = int(metrics['STARTED']['_total']) counter_started_value = int(metrics['REQUESTS_STARTED']['_total']) if counter_started_value == 0: #pt_stats.add_row([method_name, '---', '---', '---', '---']) continue counter_completed_value = int(metrics['COMPLETED']['_total']) counter_failed_value = int(metrics['FAILED']['_total']) counter_completed_value = int(metrics['REQUESTS_COMPLETED']['_total']) counter_failed_value = int(metrics['REQUESTS_FAILED']['_total']) duration_count_value = float(metrics['DURATION']['_count']) duration_sum_value = float(metrics['DURATION']['_sum']) duration_avg_value = duration_sum_value/duration_count_value Loading