← Back to team overview

sts-sponsors team mailing list archive

[Merge] ~ack/maas-ci/+git/maas-ci-internal:perf-export-all-data into ~maas-committers/maas-ci/+git/maas-ci-internal:main

 

Alberto Donato has proposed merging ~ack/maas-ci/+git/maas-ci-internal:perf-export-all-data into ~maas-committers/maas-ci/+git/maas-ci-internal:main.

Commit message:
export all metrics from results file to influxdb



Requested reviews:
  MAAS Committers (maas-committers)

For more details, see:
https://code.launchpad.net/~ack/maas-ci/+git/maas-ci-internal/+merge/435198
-- 
Your team MAAS Committers is requested to review the proposed merge of ~ack/maas-ci/+git/maas-ci-internal:perf-export-all-data into ~maas-committers/maas-ci/+git/maas-ci-internal:main.
diff --git a/utilities/export-perf-to-influxdb b/utilities/export-perf-to-influxdb
index c402974..8b75923 100755
--- a/utilities/export-perf-to-influxdb
+++ b/utilities/export-perf-to-influxdb
@@ -61,7 +61,7 @@ def main():
         url=args.host, token=f"{username}:{password}", org="-"
     ) as client:
         with client.write_api(write_options=SYNCHRONOUS) as write_api:
-            for test_name, test_result in data["tests"].items():
+            for test_name, test_results in data["tests"].items():
                 p = Point.from_dict(
                     {
                         "measurement": "testcase",
@@ -71,7 +71,7 @@ def main():
                             "test": test_name,
                             "revision": data["commit"],
                         },
-                        "fields": {"duration": test_result["duration"]},
+                        "fields": {test_results},
                         "time": ts,
                     }
                 )

Follow ups