@@ -343,6 +343,56 @@ def pushDataToRedisTimeSeries(rts: Client, branch_time_series_dict: dict):
343
343
pass
344
344
return datapoint_errors , datapoint_inserts
345
345
346
+ def extractRedisGraphVersion (results_dict : dict ):
347
+ version = None
348
+ if "DBSpecificConfigs" in results_dict :
349
+ if "RedisGraphVersion" in results_dict ["DBSpecificConfigs" ]:
350
+ version = results_dict ["DBSpecificConfigs" ]["RedisGraphVersion" ]
351
+ return version
352
+
353
+
354
+ def extractPerVersionTimeSeriesFromResults (
355
+ datapoints_timestamp : int ,
356
+ metrics : list ,
357
+ results_dict : dict ,
358
+ project_version : str ,
359
+ tf_github_org : str ,
360
+ tf_github_repo : str ,
361
+ deployment_type : str ,
362
+ test_name : str ,
363
+ tf_triggering_env : str ,
364
+ ):
365
+ branch_time_series_dict = {}
366
+ for jsonpath in metrics :
367
+ jsonpath_expr = parse (jsonpath )
368
+ metric_name = jsonpath [2 :]
369
+ metric_value = float (jsonpath_expr .find (results_dict )[0 ].value )
370
+ # prepare tags
371
+ # branch tags
372
+ version_tags = {
373
+ "version" : project_version ,
374
+ "github_org" : tf_github_org ,
375
+ "github_repo" : tf_github_repo ,
376
+ "deployment_type" : deployment_type ,
377
+ "test_name" : test_name ,
378
+ "triggering_env" : tf_triggering_env ,
379
+ "metric" : metric_name ,
380
+ }
381
+ ts_name = "ci.benchmarks.redislabs/by.version/{triggering_env}/{github_org}/{github_repo}/{test_name}/{deployment_type}/{version}/{metric}" .format (
382
+ version = project_version ,
383
+ github_org = tf_github_org ,
384
+ github_repo = tf_github_repo ,
385
+ deployment_type = deployment_type ,
386
+ test_name = test_name ,
387
+ triggering_env = tf_triggering_env ,
388
+ metric = metric_name ,
389
+ )
390
+
391
+ branch_time_series_dict [ts_name ] = {
392
+ "labels" : version_tags .copy (),
393
+ "data" : {datapoints_timestamp : metric_value },
394
+ }
395
+ return True , branch_time_series_dict
346
396
347
397
def extractPerBranchTimeSeriesFromResults (
348
398
datapoints_timestamp : int ,
@@ -371,7 +421,7 @@ def extractPerBranchTimeSeriesFromResults(
371
421
"triggering_env" : tf_triggering_env ,
372
422
"metric" : metric_name ,
373
423
}
374
- ts_name = "ci.benchmarks.redislabs/{triggering_env}/{github_org}/{github_repo}/{test_name}/{deployment_type}/{branch}/{metric}" .format (
424
+ ts_name = "ci.benchmarks.redislabs/by.branch/ {triggering_env}/{github_org}/{github_repo}/{test_name}/{deployment_type}/{branch}/{metric}" .format (
375
425
branch = str (tf_github_branch ),
376
426
github_org = tf_github_org ,
377
427
github_repo = tf_github_repo ,
0 commit comments