Created
May 5, 2015 18:09
-
-
Save jsantell/8d6f7ad60edcda34e3fb to your computer and use it in GitHub Desktop.
talos test for local benchmarks
This file contains hidden or 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
/* | |
[#0] current-worker Cycles:25 Average:558.02 Median:549.60 stddev:38.05 (6.9%) stddev-sans-first:35.29 | |
Values: 634.6 582.1 586.1 573.6 522.3 661.3 571.6 590.9 506.8 566.5 543.3 538.4 547.7 557.0 564.9 605.2 568.4 521.8 519.8 537.4 502.8 549.6 529.1 530.3 538.9 | |
[#1] devtools-worker Cycles:25 Average:521.11 Median:509.38 stddev:30.67 (6.0%) stddev-sans-first:31.14 | |
Values: 537.1 555.8 536.7 551.7 499.6 509.4 514.9 512.7 501.3 500.1 535.1 556.7 499.4 498.9 623.2 505.4 499.3 511.8 492.3 500.4 497.5 502.3 568.5 507.0 510.5 | |
*/ | |
const { CanvasGraphUtils } = Cu.import("resource:///modules/devtools/GraphsOriginal.jsm", {}); | |
const { DevToolsWorker } = devtools.require("devtools/shared/worker"); | |
const UPPERBOUND = Math.pow(10, 6); | |
const timestamps = (function(){ | |
var array = []; | |
for (let i = 0; i < UPPERBOUND; i++) { | |
array.push(i); | |
} | |
return array; | |
})(); | |
let test_workerSpeed = Task.async(function*(timer) { | |
let interval = 100; | |
let duration = 10000; | |
timer.start("current-worker"); | |
yield CanvasGraphUtils._performTaskInWorker("plotTimestampsGraph", { | |
timestamps, interval, duration | |
}); | |
timer.stop("current-worker"); | |
timer.start("devtools-worker"); | |
let worker = new DevToolsWorker("resource:///modules/devtools/GraphsWorker.js"); | |
yield worker.performTask("plotTimestampsGraph", { | |
timestamps, interval, duration | |
}); | |
timer.stop("devtools-worker"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment