[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 12:05:51 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL313496: [lnt] Allow `lnt importreport` to import hash and profile metrics. (authored by eladcohen).
Changed prior to commit:
https://reviews.llvm.org/D37959?vs=115566&id=115584#toc
Repository:
rL LLVM
https://reviews.llvm.org/D37959
Files:
lnt/trunk/lnt/lnttool/import_report.py
lnt/trunk/tests/lnttool/test_importreport.py
Index: lnt/trunk/tests/lnttool/test_importreport.py
===================================================================
--- lnt/trunk/tests/lnttool/test_importreport.py
+++ lnt/trunk/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/trunk/lnt/lnttool/import_report.py
===================================================================
--- lnt/trunk/lnt/lnttool/import_report.py
+++ lnt/trunk/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.115584.patch
Type: text/x-patch
Size: 1125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170917/35bfb03e/attachment.bin>
More information about the llvm-commits
mailing list