| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 constructor(profileView) { | 246 constructor(profileView) { |
| 247 this._profileView = profileView; | 247 this._profileView = profileView; |
| 248 } | 248 } |
| 249 | 249 |
| 250 /** | 250 /** |
| 251 * @override | 251 * @override |
| 252 * @param {number} value | 252 * @param {number} value |
| 253 * @return {string} | 253 * @return {string} |
| 254 */ | 254 */ |
| 255 formatValue(value) { | 255 formatValue(value) { |
| 256 return Common.UIString('%.1f\u2009ms', value); | 256 return Common.UIString('%.1f\xa0ms', value); |
| 257 } | 257 } |
| 258 | 258 |
| 259 /** | 259 /** |
| 260 * @override | 260 * @override |
| 261 * @param {number} value | 261 * @param {number} value |
| 262 * @param {!Profiler.ProfileDataGridNode} node | 262 * @param {!Profiler.ProfileDataGridNode} node |
| 263 * @return {string} | 263 * @return {string} |
| 264 */ | 264 */ |
| 265 formatPercent(value, node) { | 265 formatPercent(value, node) { |
| 266 return node.profileNode === this._profileView.profile.idleNode ? '' : Common
.UIString('%.2f\u2009%%', value); | 266 return node.profileNode === this._profileView.profile.idleNode ? '' : Common
.UIString('%.2f\xa0%%', value); |
| 267 } | 267 } |
| 268 | 268 |
| 269 /** | 269 /** |
| 270 * @override | 270 * @override |
| 271 * @param {!Profiler.ProfileDataGridNode} node | 271 * @param {!Profiler.ProfileDataGridNode} node |
| 272 * @return {?Element} | 272 * @return {?Element} |
| 273 */ | 273 */ |
| 274 linkifyNode(node) { | 274 linkifyNode(node) { |
| 275 return this._profileView.linkifier().maybeLinkifyConsoleCallFrame( | 275 return this._profileView.linkifier().maybeLinkifyConsoleCallFrame( |
| 276 this._profileView.target(), node.profileNode.callFrame, 'profile-node-fi
le'); | 276 this._profileView.target(), node.profileNode.callFrame, 'profile-node-fi
le'); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 entryInfo.push({title: title, value: value}); | 369 entryInfo.push({title: title, value: value}); |
| 370 } | 370 } |
| 371 /** | 371 /** |
| 372 * @param {number} ms | 372 * @param {number} ms |
| 373 * @return {string} | 373 * @return {string} |
| 374 */ | 374 */ |
| 375 function millisecondsToString(ms) { | 375 function millisecondsToString(ms) { |
| 376 if (ms === 0) | 376 if (ms === 0) |
| 377 return '0'; | 377 return '0'; |
| 378 if (ms < 1000) | 378 if (ms < 1000) |
| 379 return Common.UIString('%.1f\u2009ms', ms); | 379 return Common.UIString('%.1f\xa0ms', ms); |
| 380 return Number.secondsToString(ms / 1000, true); | 380 return Number.secondsToString(ms / 1000, true); |
| 381 } | 381 } |
| 382 var name = UI.beautifyFunctionName(node.functionName); | 382 var name = UI.beautifyFunctionName(node.functionName); |
| 383 pushEntryInfoRow(Common.UIString('Name'), name); | 383 pushEntryInfoRow(Common.UIString('Name'), name); |
| 384 var selfTime = millisecondsToString(this._entrySelfTimes[entryIndex]); | 384 var selfTime = millisecondsToString(this._entrySelfTimes[entryIndex]); |
| 385 var totalTime = millisecondsToString(timelineData.entryTotalTimes[entryIndex
]); | 385 var totalTime = millisecondsToString(timelineData.entryTotalTimes[entryIndex
]); |
| 386 pushEntryInfoRow(Common.UIString('Self time'), selfTime); | 386 pushEntryInfoRow(Common.UIString('Self time'), selfTime); |
| 387 pushEntryInfoRow(Common.UIString('Total time'), totalTime); | 387 pushEntryInfoRow(Common.UIString('Total time'), totalTime); |
| 388 var linkifier = new Components.Linkifier(); | 388 var linkifier = new Components.Linkifier(); |
| 389 var link = linkifier.maybeLinkifyConsoleCallFrame(this._target, node.callFra
me); | 389 var link = linkifier.maybeLinkifyConsoleCallFrame(this._target, node.callFra
me); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 411 * @param {!SDK.CPUProfileNode} node | 411 * @param {!SDK.CPUProfileNode} node |
| 412 */ | 412 */ |
| 413 constructor(depth, duration, startTime, selfTime, node) { | 413 constructor(depth, duration, startTime, selfTime, node) { |
| 414 this.depth = depth; | 414 this.depth = depth; |
| 415 this.duration = duration; | 415 this.duration = duration; |
| 416 this.startTime = startTime; | 416 this.startTime = startTime; |
| 417 this.selfTime = selfTime; | 417 this.selfTime = selfTime; |
| 418 this.node = node; | 418 this.node = node; |
| 419 } | 419 } |
| 420 }; | 420 }; |
| OLD | NEW |