forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DevTools: Show all OOPIFs JS memory in performance monitor.
Change-Id: Iea75bf9bce3d1409122b94154c262667696a95f4 Reviewed-on: https://chromium-review.googlesource.com/985966 Commit-Queue: Alexei Filippov <alph@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#547536}
- Loading branch information
Showing
4 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...party/WebKit/LayoutTests/http/tests/devtools/oopif/oopif-performance-monitor-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Tests list of performance metrics and that memory is not double counted. | ||
|
||
|
||
Metrics reported: | ||
AudioHandlers | ||
Documents | ||
DomContentLoaded | ||
FirstMeaningfulPaint | ||
Frames | ||
JSEventListeners | ||
JSHeapTotalSize | ||
JSHeapUsedSize | ||
LayoutCount | ||
LayoutDuration | ||
LayoutObjects | ||
MediaKeySessions | ||
MediaKeys | ||
NavigationStart | ||
Nodes | ||
PausableObjects | ||
RTCPeerConnections | ||
RecalcStyleCount | ||
RecalcStyleDuration | ||
ResourceFetchers | ||
Resources | ||
ScriptDuration | ||
ScriptPromises | ||
TaskDuration | ||
Timestamp | ||
UACSSResources | ||
V8PerContextDatas | ||
WorkerGlobalScopes | ||
|
||
Targets after navigate | ||
Main | ||
iframe.html | ||
inner-iframe.html | ||
inner-iframe.html | ||
|
||
metrics size is twice smaller than simple sum: true | ||
|
32 changes: 32 additions & 0 deletions
32
third_party/WebKit/LayoutTests/http/tests/devtools/oopif/oopif-performance-monitor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2018 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
(async function() { | ||
TestRunner.addResult(`Tests list of performance metrics and that memory is not double counted.\n`); | ||
|
||
const model = SDK.targetManager.mainTarget().model(SDK.PerformanceMetricsModel); | ||
await model.enable(); | ||
let metrics = (await model.requestMetrics()).metrics; | ||
|
||
TestRunner.addResult('\nMetrics reported:'); | ||
TestRunner.addResults(metrics.keysArray().sort()); | ||
|
||
await TestRunner.navigatePromise('resources/page.html'); | ||
TestRunner.addResult('\nTargets after navigate'); | ||
TestRunner.addResults(SDK.targetManager.targets().map(t => t.name()).sort()); | ||
|
||
let lastTotal, total; | ||
do { | ||
metrics = (await model.requestMetrics()).metrics; | ||
lastTotal = total; | ||
total = 0; | ||
for (const m of SDK.targetManager.models(SDK.RuntimeModel)) | ||
total += (await m.heapUsage()).totalSize; | ||
} while (total !== lastTotal); | ||
|
||
TestRunner.addResult('\nmetrics size is twice smaller than simple sum: ' + | ||
(metrics.get('JSHeapTotalSize') * 2 === total)); | ||
|
||
TestRunner.completeTest(); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters