Skip to content

Commit

Permalink
Merge pull request #22 from alexandru-io/migrate_benchmarks_to_btime
Browse files Browse the repository at this point in the history
Migrate raptor-webext benchmarks to browsertime
  • Loading branch information
alexandru-io authored Mar 19, 2021
2 parents e19a086 + 8f6a5b3 commit 54c3c3d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions benchmarks/JetStream2/JetStreamDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ class Driver {
var _data = ['raptor-benchmark', 'jetstream2', measured];
console.log('jetstream2 is about to post results to the raptor webext');
window.postMessage(_data, '*');
// Send the results to browsertime
window.sessionStorage.setItem('benchmark_results', JSON.stringify(_data));
}
//=================================================================================

Expand Down
2 changes: 2 additions & 0 deletions benchmarks/assorted-dom/analyze-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ function postToRaptor() {
_data = ['raptor-benchmark', 'assorted-dom', benchmark_results]
console.log("posting results to raptor browser extension");
window.postMessage(_data, '*');
// Send the results to browsertime
window.sessionStorage.setItem('benchmark_results', JSON.stringify(_data));
}

window.onload = function(){
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/unity-webgl/Data/mozbench.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ function postResults() {
if (location.search == '?raptor') {
var _data = ['raptor-benchmark', 'unity-webgl', JSON.stringify(results)];
window.postMessage(_data, '*');
// Send the results to browsertime
window.sessionStorage.setItem('benchmark_results', JSON.stringify(_data));
} else {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST", "/results", true);
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/wasm-misc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

_data = ['raptor-benchmark', 'wasm-misc', results];
window.postMessage(_data, '*');
// Send the results to browsertime
window.sessionStorage.setItem('benchmark_results', JSON.stringify(_data));
}

function instantiate(module) {
Expand Down

0 comments on commit 54c3c3d

Please sign in to comment.