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

Unified Diff: Source/devtools/front_end/profiler/CPUProfileFlameChart.js

Issue 319363002: DevTools: CPUFlameChart: stick function entry color to the function name and url. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed 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
« no previous file with comments | « Source/devtools/front_end/components/FlameChart.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/profiler/CPUProfileFlameChart.js
diff --git a/Source/devtools/front_end/profiler/CPUProfileFlameChart.js b/Source/devtools/front_end/profiler/CPUProfileFlameChart.js
index 7d3ea8b1f63617e1e338fadf6c505517aa18035f..a4e50f9a3c1b7848367c3fcc096c7d203b048811 100644
--- a/Source/devtools/front_end/profiler/CPUProfileFlameChart.js
+++ b/Source/devtools/front_end/profiler/CPUProfileFlameChart.js
@@ -276,7 +276,7 @@ WebInspector.CPUFlameChartDataProvider.prototype = {
entryColor: function(entryIndex)
{
var node = this._entryNodes[entryIndex];
- return this._colorGenerator.colorForID(node.functionName + ":" + node.url + ":" + node.lineNumber);
+ return this._colorGenerator.colorForID(node.functionName + ":" + node.url);
},
/**
@@ -342,10 +342,13 @@ WebInspector.CPUFlameChartDataProvider.prototype = {
WebInspector.CPUFlameChartDataProvider.colorGenerator = function()
{
if (!WebInspector.CPUFlameChartDataProvider._colorGenerator) {
- var colorGenerator = new WebInspector.FlameChart.ColorGenerator();
- colorGenerator.setColorForID("(idle)::0", "hsl(0, 0%, 94%)");
- colorGenerator.setColorForID("(program)::0", "hsl(0, 0%, 80%)");
- colorGenerator.setColorForID("(garbage collector)::0", "hsl(0, 0%, 80%)");
+ var colorGenerator = new WebInspector.FlameChart.ColorGenerator(
+ { min: 180, max: 310, count: 7 },
+ { min: 50, max: 80, count: 5 },
+ { min: 80, max: 90, count: 3 });
+ colorGenerator.setColorForID("(idle):", "hsl(0, 0%, 94%)");
+ colorGenerator.setColorForID("(program):", "hsl(0, 0%, 80%)");
+ colorGenerator.setColorForID("(garbage collector):", "hsl(0, 0%, 80%)");
WebInspector.CPUFlameChartDataProvider._colorGenerator = colorGenerator;
}
return WebInspector.CPUFlameChartDataProvider._colorGenerator;
« no previous file with comments | « Source/devtools/front_end/components/FlameChart.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698