Commit 5fd5ad14 authored by Alexei Filippov's avatar Alexei Filippov Committed by Commit Bot

DevTools: Clarify memory profile titles and descriptions.

Change-Id: I010c2533ac3e0b6de0af0e3eb1bdd524c7c606b4
Reviewed-on: https://chromium-review.googlesource.com/896641
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534642}
parent dcbfd504
......@@ -160,16 +160,18 @@ Profiler.SamplingHeapProfileTypeBase = class extends Profiler.ProfileType {
*/
Profiler.SamplingHeapProfileType = class extends Profiler.SamplingHeapProfileTypeBase {
constructor() {
super(Profiler.SamplingHeapProfileType.TypeId, Common.UIString('Record allocation profile'));
super(Profiler.SamplingHeapProfileType.TypeId, ls`Allocation sampling`);
Profiler.SamplingHeapProfileType.instance = this;
}
get treeItemTitle() {
return Common.UIString('ALLOCATION PROFILES');
return ls`SAMPLING PROFILES`;
}
get description() {
return Common.UIString('Allocation profiles show memory allocations from your JavaScript functions.');
return ls`Record memory allocations using sampling method.
This profile type has minimal performance overhead and can be used for long running operations.
It provides good approximation of allocations broken down by JavaScript execution stack.`;
}
/**
......@@ -195,16 +197,16 @@ Profiler.SamplingHeapProfileType.TypeId = 'SamplingHeap';
*/
Profiler.SamplingNativeHeapProfileType = class extends Profiler.SamplingHeapProfileTypeBase {
constructor() {
super(Profiler.SamplingNativeHeapProfileType.TypeId, Common.UIString('Record native memory allocation profile'));
super(Profiler.SamplingNativeHeapProfileType.TypeId, ls`Native memory allocation sampling`);
Profiler.SamplingNativeHeapProfileType.instance = this;
}
get treeItemTitle() {
return Common.UIString('NATIVE ALLOCATION PROFILES');
return ls`NATIVE SAMPLING PROFILES`;
}
get description() {
return Common.UIString('Allocation profiles show sampled native memory allocations from the renderer process.');
return ls`Allocation profiles show sampled native memory allocations from the renderer process.`;
}
/**
......@@ -230,7 +232,7 @@ Profiler.SamplingNativeHeapProfileType.TypeId = 'SamplingNativeHeapRecording';
*/
Profiler.SamplingNativeHeapSnapshotType = class extends Profiler.SamplingHeapProfileTypeBase {
constructor() {
super(Profiler.SamplingNativeHeapSnapshotType.TypeId, Common.UIString('Take native memory allocations snapshot'));
super(Profiler.SamplingNativeHeapSnapshotType.TypeId, ls`Native memory allocation snapshot`);
Profiler.SamplingNativeHeapSnapshotType.instance = this;
}
......@@ -243,14 +245,13 @@ Profiler.SamplingNativeHeapSnapshotType = class extends Profiler.SamplingHeapPro
}
get treeItemTitle() {
return Common.UIString('NATIVE SNAPSHOTS');
return ls`NATIVE SNAPSHOTS`;
}
get description() {
return Common.UIString(
'Native memory snapshots show sampled native allocations in the renderer process since start up. ' +
'Chrome has to be started with --sampling-heap-profiler flag. ' +
'Check flags at chrome://flags');
return ls`Native memory snapshots show sampled native allocations in the renderer process since start up.
Chrome has to be started with --sampling-heap-profiler flag.
Check flags at chrome://flags`;
}
/**
......
......@@ -943,7 +943,7 @@ Profiler.HeapSnapshotProfileType = class extends Profiler.ProfileType {
* @param {string=} title
*/
constructor(id, title) {
super(id || Profiler.HeapSnapshotProfileType.TypeId, title || Common.UIString('Take heap snapshot'));
super(id || Profiler.HeapSnapshotProfileType.TypeId, title || ls`Heap snapshot`);
SDK.targetManager.observeModels(SDK.HeapProfilerModel, this);
SDK.targetManager.addModelListener(
SDK.HeapProfilerModel, SDK.HeapProfilerModel.Events.ResetProfiles, this._resetProfiles, this);
......@@ -1095,7 +1095,7 @@ Profiler.HeapSnapshotProfileType.SnapshotReceived = 'SnapshotReceived';
*/
Profiler.TrackingHeapSnapshotProfileType = class extends Profiler.HeapSnapshotProfileType {
constructor() {
super(Profiler.TrackingHeapSnapshotProfileType.TypeId, Common.UIString('Record allocation timeline'));
super(Profiler.TrackingHeapSnapshotProfileType.TypeId, ls`Allocation instrumentation on timeline`);
}
/**
......@@ -1165,8 +1165,7 @@ Profiler.TrackingHeapSnapshotProfileType = class extends Profiler.HeapSnapshotPr
}
get buttonTooltip() {
return this._recording ? Common.UIString('Stop recording heap profile') :
Common.UIString('Start recording heap profile');
return this._recording ? ls`Stop recording heap profile` : ls`Start recording heap profile`;
}
/**
......@@ -1245,12 +1244,15 @@ Profiler.TrackingHeapSnapshotProfileType = class extends Profiler.HeapSnapshotPr
}
get treeItemTitle() {
return Common.UIString('ALLOCATION TIMELINES');
return ls`ALLOCATION TIMELINES`;
}
get description() {
return Common.UIString(
'Allocation timelines show memory allocations from your heap over time. Use this profile type to isolate memory leaks.');
return ls`
Allocation timelines show instrumented JavaScript memory allocations over time.
Once profile is recorded you can select a time interval to see objects that
were allocated within it and still alive by the end of recording.
Use this profile type to isolate memory leaks.`;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment