Title: [91412] trunk/Tools
- Revision
- 91412
- Author
- [email protected]
- Date
- 2011-07-20 15:16:53 -0700 (Wed, 20 Jul 2011)
Log Message
make the treemap display more human friendly
https://bugs.webkit.org/show_bug.cgi?id=64896
Reviewed by Tony Chang.
* TestResultServer/static-dashboards/treemap.html:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (91411 => 91412)
--- trunk/Tools/ChangeLog 2011-07-20 22:06:03 UTC (rev 91411)
+++ trunk/Tools/ChangeLog 2011-07-20 22:16:53 UTC (rev 91412)
@@ -1,3 +1,12 @@
+2011-07-20 Ojan Vafai <[email protected]>
+
+ make the treemap display more human friendly
+ https://bugs.webkit.org/show_bug.cgi?id=64896
+
+ Reviewed by Tony Chang.
+
+ * TestResultServer/static-dashboards/treemap.html:
+
2011-07-20 Eric Seidel <[email protected]>
Move HttpLock to using a FileSystem object
Modified: trunk/Tools/TestResultServer/static-dashboards/treemap.html (91411 => 91412)
--- trunk/Tools/TestResultServer/static-dashboards/treemap.html 2011-07-20 22:06:03 UTC (rev 91411)
+++ trunk/Tools/TestResultServer/static-dashboards/treemap.html 2011-07-20 22:16:53 UTC (rev 91412)
@@ -112,10 +112,22 @@
var TEST_URL_BASE_PATH = "http://svn.webkit.org/repository/webkit/trunk/";
+function humanReadableTime(milliseconds)
+{
+ if (milliseconds < 1000)
+ return milliseconds + 'ms';
+ else if (milliseconds < 60000)
+ return Math.floor(milliseconds / 1000).toPrecision(2) + 's';
+
+ var minutes = Math.floor(milliseconds / 60000);
+ var seconds = Math.floor((milliseconds - minutes * 60000) / 1000);
+ return minutes + 'm' + seconds + 's';
+}
+
// This looks like:
// { "data": {"$area": (sum of all timings)},
-// "name": (name of this node),
-// "children": [ (child nodes, in the same format as this) ] }
+// "name": (name of this node),
+// "children": [ (child nodes, in the same format as this) ] }
// childCount is added just to be includes in the node's name
function convertToWebTreemapFormat(treename, tree)
{
@@ -128,7 +140,7 @@
var time = treeNode;
var node = {
"data": {"$area": time},
- "name": name + " (" + time + "ms)"
+ "name": name + " (" + humanReadableTime(time) + ")"
};
children.push(node);
total += time;
@@ -149,7 +161,7 @@
return {
"data": {"$area": total},
- "name": treename + " (" + total + "ms - " + childCount + " tests)",
+ "name": treename + " (" + humanReadableTime(total) + " - " + childCount + " tests)",
"children": children,
"childCount": childCount
};
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes