Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1880)

Unified Diff: Source/devtools/front_end/timeline/TimelineMemoryOverview.js

Issue 337123002: Support counter graphs in Timeline based on trace events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelineMemoryOverview.js
diff --git a/Source/devtools/front_end/timeline/TimelineMemoryOverview.js b/Source/devtools/front_end/timeline/TimelineMemoryOverview.js
index c00107b26dbc0d95aa8341867e69feb54db229bf..17f2fc0d6c898a6735abe10ab1b1690c58a05e14 100644
--- a/Source/devtools/front_end/timeline/TimelineMemoryOverview.js
+++ b/Source/devtools/front_end/timeline/TimelineMemoryOverview.js
@@ -68,10 +68,8 @@ WebInspector.TimelineMemoryOverview.prototype = {
*/
function calculateMinMaxSizes(record)
{
- if (record.type() !== WebInspector.TimelineModel.RecordType.UpdateCounters)
- return;
- var counters = record.data();
- if (!counters.jsHeapSizeUsed)
+ var counters = record.counters();
+ if (!counters || !counters.jsHeapSizeUsed)
return;
maxUsedHeapSize = Math.max(maxUsedHeapSize, counters.jsHeapSizeUsed);
minUsedHeapSize = Math.min(minUsedHeapSize, counters.jsHeapSizeUsed);
@@ -92,10 +90,8 @@ WebInspector.TimelineMemoryOverview.prototype = {
*/
function buildHistogram(record)
{
- if (record.type() !== WebInspector.TimelineModel.RecordType.UpdateCounters)
- return;
- var counters = record.data();
- if (!counters.jsHeapSizeUsed)
+ var counters = record.counters();
+ if (!counters || !counters.jsHeapSizeUsed)
return;
var x = Math.round((record.endTime() - minTime) * xFactor);
var y = Math.round((counters.jsHeapSizeUsed - minUsedHeapSize) * yFactor);
« no previous file with comments | « Source/devtools/front_end/timeline/MemoryCountersGraph.js ('k') | Source/devtools/front_end/timeline/TimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698