The MetricValue abstraction doesn't currently provide any value really, but it 
is there in case we ever wanted to make use of the values (e.g., report 
performance changes). Given that, I think it probably makes sense to just call 
this JSONMetricValue and make it explicit that this is tied to values which are 
representable in the output, but which will otherwise be uninterpreted.

================
Comment at: utils/lit/lit/Test.py:78
@@ +77,3 @@
+    return type(value) in [dict, list, tuple, str, unicode, int, long, float,
+                           bool, type(None)]
+
----------------
Wouldn't isinstance() be more canonical?

Also, this should probably verify that the container data types themselves 
contain representable items. Does the json lib provide a function to do that?

================
Comment at: utils/lit/lit/Test.py:96
@@ +95,3 @@
+    elif type(value) in [int, long]:
+        return IntMetricValue(value)
+    elif type(value) is float:
----------------
Same note re: isinstance().

http://reviews.llvm.org/D6576



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to