@@ -535,7 +535,9 @@ def run_remote_command_logic(args, project_name, project_version):
535535 end_time_ms ,
536536 _ ,
537537 overall_end_time_metrics ,
538- ) = collect_redis_metrics (redis_conns )
538+ ) = collect_redis_metrics (
539+ redis_conns , ["cpu" , "memory" ]
540+ )
539541 export_redis_metrics (
540542 artifact_version ,
541543 end_time_ms ,
@@ -549,6 +551,27 @@ def run_remote_command_logic(args, project_name, project_version):
549551 tf_github_repo ,
550552 tf_triggering_env ,
551553 )
554+ (
555+ end_time_ms ,
556+ _ ,
557+ overall_commandstats_metrics ,
558+ ) = collect_redis_metrics (
559+ redis_conns , ["commandstats" ]
560+ )
561+ export_redis_metrics (
562+ artifact_version ,
563+ end_time_ms ,
564+ overall_commandstats_metrics ,
565+ rts ,
566+ setup_name ,
567+ setup_type ,
568+ test_name ,
569+ tf_github_branch ,
570+ tf_github_org ,
571+ tf_github_repo ,
572+ tf_triggering_env ,
573+ {"metric-type" : "commandstats" },
574+ )
552575
553576 if setup_details ["env" ] is None :
554577 if args .keep_env_and_topo is False :
@@ -767,6 +790,7 @@ def export_redis_metrics(
767790 tf_github_org ,
768791 tf_github_repo ,
769792 tf_triggering_env ,
793+ metadata_dict = None ,
770794):
771795 datapoint_errors = 0
772796 datapoint_inserts = 0
@@ -818,6 +842,8 @@ def export_redis_metrics(
818842 )
819843 variant_labels_dict ["test_name" ] = test_name
820844 variant_labels_dict ["metric" ] = metric_name
845+ if metadata_dict is not None :
846+ variant_labels_dict .update (metadata_dict )
821847
822848 timeseries_dict [tsname_metric ] = {
823849 "labels" : get_project_ts_tags (
0 commit comments