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

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

Issue 2515693003: DevTools: bring violations and timeline warnings in sync. (Closed)
Patch Set: Created 4 years, 1 month 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 span.appendChild(UI.createDocumentationLink( 1731 span.appendChild(UI.createDocumentationLink(
1732 '../../fundamentals/performance/rendering/avoid-large-complex-layout s-and-layout-thrashing#avoid-forced-synchronous-layouts', 1732 '../../fundamentals/performance/rendering/avoid-large-complex-layout s-and-layout-thrashing#avoid-forced-synchronous-layouts',
1733 Common.UIString('Forced reflow'))); 1733 Common.UIString('Forced reflow')));
1734 span.createTextChild(Common.UIString(' is a likely performance bottlenec k.')); 1734 span.createTextChild(Common.UIString(' is a likely performance bottlenec k.'));
1735 break; 1735 break;
1736 case warnings.IdleDeadlineExceeded: 1736 case warnings.IdleDeadlineExceeded:
1737 span.textContent = Common.UIString( 1737 span.textContent = Common.UIString(
1738 'Idle callback execution extended beyond deadline by ' + 1738 'Idle callback execution extended beyond deadline by ' +
1739 Number.millisToString(event.duration - eventData['allottedMillisecon ds'], true)); 1739 Number.millisToString(event.duration - eventData['allottedMillisecon ds'], true));
1740 break; 1740 break;
1741 case warnings.LongHandler:
1742 span.textContent = Common.UIString('Handler took ' + Number.millisToStri ng(event.duration, true));
alph 2016/11/19 05:36:27 May be it can be more explicit on what's wrong, e.
caseq 2016/11/19 05:51:08 Common.UIString('Handler look %s', Number.millisTo
1743 break;
1744 case warnings.LongRecurringHandler:
1745 span.textContent = Common.UIString('Recurring handler took ' + Number.mi llisToString(event.duration, true));
caseq 2016/11/19 05:51:08 ditto.
1746 break;
1741 case warnings.V8Deopt: 1747 case warnings.V8Deopt:
1742 span.appendChild(UI.createExternalLink( 1748 span.appendChild(UI.createExternalLink(
1743 'https://github.com/GoogleChrome/devtools-docs/issues/53', Common.UI String('Not optimized'))); 1749 'https://github.com/GoogleChrome/devtools-docs/issues/53', Common.UI String('Not optimized')));
1744 span.createTextChild(Common.UIString(': %s', eventData['deoptReason'])); 1750 span.createTextChild(Common.UIString(': %s', eventData['deoptReason']));
1745 break; 1751 break;
1746 default: 1752 default:
1747 console.assert(false, 'Unhandled TimelineModel.WarningType'); 1753 console.assert(false, 'Unhandled TimelineModel.WarningType');
1748 } 1754 }
1749 return span; 1755 return span;
1750 } 1756 }
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 /** 2239 /**
2234 * @param {!SDK.TracingModel.Event} event 2240 * @param {!SDK.TracingModel.Event} event
2235 * @param {string=} warningType 2241 * @param {string=} warningType
2236 */ 2242 */
2237 appendWarningRow(event, warningType) { 2243 appendWarningRow(event, warningType) {
2238 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); 2244 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType);
2239 if (warning) 2245 if (warning)
2240 this.appendElementRow(Common.UIString('Warning'), warning, true); 2246 this.appendElementRow(Common.UIString('Warning'), warning, true);
2241 } 2247 }
2242 }; 2248 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698