mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
45b8007f3d
- Bug 1150717 - Test request with no params in the Network Monitor. r=brings (a60e9e8d9) - Bug 1168077 - Remove remaining spidermonkey js specific syntax from browser/devtools; r=miker (c98f20c30) - Bug 1168125 - Fix existing tests, r=jsantell (b1dfa101e) - Bug 1169439 - Pull out marker definitions into its own file, and move formatter and collapse functions into marker-utils. r=vp (17eb24ab3) - Bug 1173654 - Part 1: Add logging methods for SurfaceType and ImageFormat. r=Bas (22f2fa019) - Bug 1169125 - Part 1: Allow sending any DataSourceSurface-backed image over WebRTC and fix failure cases. r=bwc (1fb0def92) - Bug 1169125 - Part 2: Use UniquePtr for scoped delete of yuv data in MediaPipeline. r=bwc (cdb79e201) - Bug 1173654 - Part 2: Use namespaces in MediaPipeline.cpp. r=bwc (311696260) - Bug 1173654 - Part 3: Attempt to GetDataSurface() and convert if sending pure I420 fails. r=bwc, r=jesup (58520b820) - Bug 1173654 - Part 4: Add detailed logging and asserts to MediaPipeline::ProcessVideoChunk. r=bwc (ba08ae5bc) - Bug 1155089 - Part 1: Reset |TrackID| for MediaPipelineTransmit::PipelineListener on replaceTrack(). r=bwc (304fb8703) - adapted Bug 1142688 - Wait for actual audio data on remote side before checking audio sanity. r=jesup,padenot (479f6356c) - Bug 858927 - Move the mozilla::TimeStamp into mozglue. r=glandium (751938e09) - Bug 1166559 - Add documentation for ProfileTimelineMarkers from a dev tools perspective. r=fitzgen (ed1563dfb) - Bug 1141614 - Part 4: Expose cycle collection markers in the devtools frontend; r=jsantell (2eb830de7)
59 lines
2.2 KiB
JavaScript
59 lines
2.2 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
/**
|
|
* Tests if the retrieved profiler data samples are correctly filtered and
|
|
* normalized before passed to consumers.
|
|
*/
|
|
|
|
const WAIT_TIME = 1000; // ms
|
|
|
|
function* spawnTest() {
|
|
let { panel } = yield initPerformance(SIMPLE_URL);
|
|
let front = panel.panelWin.gFront;
|
|
|
|
// Perform the first recording...
|
|
|
|
let firstRecording = yield front.startRecording();
|
|
let firstRecordingStartTime = firstRecording._profilerStartTime;
|
|
info("Started profiling at: " + firstRecordingStartTime);
|
|
|
|
busyWait(WAIT_TIME); // allow the profiler module to sample some cpu activity
|
|
|
|
yield front.stopRecording(firstRecording);
|
|
|
|
is(firstRecordingStartTime, 0,
|
|
"The profiling start time should be 0 for the first recording.");
|
|
ok(firstRecording.getDuration() >= WAIT_TIME,
|
|
"The first recording duration is correct.");
|
|
|
|
// Perform the second recording...
|
|
|
|
let secondRecording = yield front.startRecording();
|
|
let secondRecordingStartTime = secondRecording._profilerStartTime;
|
|
info("Started profiling at: " + secondRecordingStartTime);
|
|
|
|
busyWait(WAIT_TIME); // allow the profiler module to sample more cpu activity
|
|
|
|
yield front.stopRecording(secondRecording);
|
|
let secondRecordingProfile = secondRecording.getProfile();
|
|
let secondRecordingSamples = secondRecordingProfile.threads[0].samples.data;
|
|
|
|
isnot(secondRecording._profilerStartTime, 0,
|
|
"The profiling start time should not be 0 on the second recording.");
|
|
ok(secondRecording.getDuration() >= WAIT_TIME,
|
|
"The second recording duration is correct.");
|
|
|
|
const TIME_SLOT = secondRecordingProfile.threads[0].samples.schema.time;
|
|
ok(secondRecordingSamples[0][TIME_SLOT] < secondRecordingStartTime,
|
|
"The second recorded sample times were normalized.");
|
|
ok(secondRecordingSamples[0][TIME_SLOT] > 0,
|
|
"The second recorded sample times were normalized correctly.");
|
|
ok(!secondRecordingSamples.find(e => e[TIME_SLOT] + secondRecordingStartTime <= firstRecording.getDuration()),
|
|
"There should be no samples from the first recording in the second one, " +
|
|
"even though the total number of frames did not overflow.");
|
|
|
|
yield teardown(panel);
|
|
finish();
|
|
}
|