[PATCH] D37959: [lnt] Allow `lnt importreport` to import hash and profile metrics.
Elad Cohen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 17 01:14:58 PDT 2017
eladcohen created this revision.
https://reviews.llvm.org/D37959
Files:
lnt/lnttool/import_report.py
tests/lnttool/test_importreport.py
Index: tests/lnttool/test_importreport.py
===================================================================
--- tests/lnttool/test_importreport.py
+++ tests/lnttool/test_importreport.py
@@ -2,5 +2,7 @@
#
# RUN: echo "foo.exec 10" > input
# RUN: echo "bar.exec 20" >> input
+# RUN: echo "foo.hash d7" >> input
+# RUN: echo "bar.profile Xz6/" >> input
# RUN: lnt importreport --testsuite nts --order 123 --machine foo input output.json
# RUN: cat output.json
Index: lnt/lnttool/import_report.py
===================================================================
--- lnt/lnttool/import_report.py
+++ lnt/lnttool/import_report.py
@@ -41,7 +41,10 @@
for line in input.readlines():
key, val = line.split()
- test = lnt.testing.TestSamples(suite + "." + key, [val])
+ metric = key.split(".")[1]
+ metric_type = float if metric not in ("hash", "profile") else str
+ test = lnt.testing.TestSamples(suite + "." + key, [val], conv_f = metric_type)
+
report.tests.extend([test])
output.write(report.render())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37959.115566.patch
Type: text/x-patch
Size: 1065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170917/eef376ed/attachment.bin>
More information about the llvm-commits
mailing list