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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineModel.js

Issue 1811773002: DevTools: Use live location for line level profile presentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 nodesToGo.push(node); 1760 nodesToGo.push(node);
1761 if (!node.url || !node.positionTicks) 1761 if (!node.url || !node.positionTicks)
1762 continue; 1762 continue;
1763 var fileInfo = this._files.get(node.url); 1763 var fileInfo = this._files.get(node.url);
1764 if (!fileInfo) { 1764 if (!fileInfo) {
1765 fileInfo = new Map(); 1765 fileInfo = new Map();
1766 this._files.set(node.url, fileInfo); 1766 this._files.set(node.url, fileInfo);
1767 } 1767 }
1768 for (var j = 0; j < node.positionTicks.length; ++j) { 1768 for (var j = 0; j < node.positionTicks.length; ++j) {
1769 var lineInfo = node.positionTicks[j]; 1769 var lineInfo = node.positionTicks[j];
1770 var line = lineInfo.line - 1; 1770 var line = lineInfo.line;
1771 var time = lineInfo.ticks * sampleDuration; 1771 var time = lineInfo.ticks * sampleDuration;
1772 fileInfo.set(line, (fileInfo.get(line) || 0) + time); 1772 fileInfo.set(line, (fileInfo.get(line) || 0) + time);
1773 } 1773 }
1774 } 1774 }
1775 } 1775 }
1776 }, 1776 },
1777 1777
1778 /** 1778 /**
1779 * @return {!Map<string, !Map<number, number>>} 1779 * @return {!Map<string, !Map<number, number>>}
1780 */ 1780 */
1781 files: function() 1781 files: function()
1782 { 1782 {
1783 return this._files; 1783 return this._files;
1784 } 1784 }
1785 } 1785 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698