aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/model/ExportResult.py
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2022-11-30 14:46:10 +0000
committerpmikus <peter.mikus@protonmail.ch>2022-12-06 07:12:09 +0000
commit5466cc69f18a480dbff7e39d28abbbccf683ba2f (patch)
tree1ec87291b32aa79dc2f6a48b7a3533548f5ed61b /resources/libraries/python/model/ExportResult.py
parentbfbdfaedb044b7643b81f47e76285baedfee9e25 (diff)
feat(telemetry): Add telemetry export
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: Ibb8a59fd4e08bc736494c7ab18e689a55f7a98dc
Diffstat (limited to 'resources/libraries/python/model/ExportResult.py')
-rw-r--r--resources/libraries/python/model/ExportResult.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/resources/libraries/python/model/ExportResult.py b/resources/libraries/python/model/ExportResult.py
index dbe2914565..31840c9deb 100644
--- a/resources/libraries/python/model/ExportResult.py
+++ b/resources/libraries/python/model/ExportResult.py
@@ -210,3 +210,12 @@ def export_ndrpdr_latency(text, latency):
if len(latency) < 2:
return
_add_latency(result_node, percent, u"reverse", latency[1])
+
+def append_telemetry(telemetry_item):
+ """Append telemetry entry to proper place so it is dumped into json.
+
+ :param telemetry_item: Telemetry entry.
+ :type telemetry_item: str
+ """
+ data = get_export_data()
+ data[u"telemetry"].append(telemetry_item)