From 189eda5ece3984140c0e393e76d5663c1f8234bb Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 24 Jul 2016 12:54:22 -0700 Subject: [PATCH 1/8] Update lodash to 4.14.0 and qunitjs to 2.0.1. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2ae7d8b6..f374a903 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "test": "node test/test" }, "dependencies": { - "lodash": "^4.13.1", + "lodash": "^4.14.0", "platform": "^1.3.1" }, "devDependencies": { @@ -26,7 +26,7 @@ "docdown": "~0.6.1", "istanbul": "0.4.4", "qunit-extras": "^2.1.0", - "qunitjs": "^2.0.0", + "qunitjs": "^2.0.1", "requirejs": "^2.2.0" }, "files": [ From 1a4a2f2beacf74aa75875adcef007afc54d3b78c Mon Sep 17 00:00:00 2001 From: Max Beatty Date: Sun, 24 Jul 2016 21:12:44 -0700 Subject: [PATCH 2/8] Remove setting user agent in jsperf example. (#155) --- example/jsperf/ui.js | 1 - 1 file changed, 1 deletion(-) diff --git a/example/jsperf/ui.js b/example/jsperf/ui.js index 8fb1f879..12a36811 100644 --- a/example/jsperf/ui.js +++ b/example/jsperf/ui.js @@ -223,7 +223,6 @@ addListener('run', 'click', handlers.button.run); setHTML('run', texts.run.ready); - setHTML('user-agent', Benchmark.platform); setStatus(texts.status.ready); // prefill author details From fb382b61427546b3f47b044fba67614f985a38cd Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Tue, 26 Jul 2016 06:58:47 -0700 Subject: [PATCH 3/8] Fix Benchmark#toString() stringification of error. (#122) --- benchmark.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/benchmark.js b/benchmark.js index 11bc2bab..803811ea 100644 --- a/benchmark.js +++ b/benchmark.js @@ -1530,8 +1530,18 @@ result = bench.name || (_.isNaN(id) ? id : ''); if (error) { - result += ': ' + join(error); - } else { + var errorStr; + if (!_.isObject(error)) { + errorStr = String(error); + } else if (!_.isError(Error)) { + errorStr = join(error); + } else { + // Error#name and Error#message properties are non-enumerable. + errorStr = join(_.assign({ 'name': error.name, 'message': error.message }, error)); + } + result += ': ' + errorStr; + } + else { result += ' x ' + formatNumber(hz.toFixed(hz < 100 ? 2 : 0)) + ' ops/sec ' + pm + stats.rme.toFixed(2) + '% (' + size + ' run' + (size == 1 ? '' : 's') + ' sampled)'; } From 08aa79b0bace358701456f1cff44468dcae76fb9 Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Thu, 28 Jul 2016 22:00:47 +0200 Subject: [PATCH 4/8] Fix typos in comments. (#156) --- plugin/ui.browserscope.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/ui.browserscope.js b/plugin/ui.browserscope.js index ac3af586..4449f2a1 100644 --- a/plugin/ui.browserscope.js +++ b/plugin/ui.browserscope.js @@ -615,7 +615,7 @@ // set "posting" message and attempt to post the results snapshot setMessage(me.texts.post); - // Note: We originally created an iframe to avoid Browerscope's old limit + // Note: We originally created an iframe to avoid Browserscope's old limit // of one beacon per page load. It's currently used to implement custom // request timeout and retry routines. var idoc = win.frames[name].document; @@ -728,7 +728,7 @@ !response && visualization && setMessage(me.texts.error); retry(true); } - // visualization chart gallary + // visualization chart gallery // https://developers.google.com/chart/interactive/docs/gallery else if (!ui.running) { var data = cloneData(response.getDataTable()), From 80b3c874c9c27babe2c370053ab5e68727c668e7 Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Thu, 28 Jul 2016 22:03:25 +0200 Subject: [PATCH 5/8] Make browserscope use https. (#158) --- example/jsperf/main.css | 2 +- plugin/ui.browserscope.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/jsperf/main.css b/example/jsperf/main.css index de869fc9..59b99548 100644 --- a/example/jsperf/main.css +++ b/example/jsperf/main.css @@ -345,7 +345,7 @@ footer { width: 232px; height: 39px; filter: none; - background: url(//www.browserscope.org/static/img/logo.png) 0 0 no-repeat; + background: url(https://www.browserscope.org/static/img/logo.png) 0 0 no-repeat; } #bs-ua { diff --git a/plugin/ui.browserscope.js b/plugin/ui.browserscope.js index 4449f2a1..dfc86309 100644 --- a/plugin/ui.browserscope.js +++ b/plugin/ui.browserscope.js @@ -578,7 +578,7 @@ setMessage(me.texts.loading); // request Browserscope chart data and pass it to `google.visualization.Query.setResponse()` (new visualization.Query( - '//www.browserscope.org/gviz_table_data?category=usertest_' + me.key + '&v=' + filterMap[filterBy], + 'https://www.browserscope.org/gviz_table_data?category=usertest_' + me.key + '&v=' + filterMap[filterBy], { 'sendMethod': 'scriptInjection' } )) .send(onComplete); From 1d852047476baa20ee82eac743249c96969e50e8 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 28 Jul 2016 13:07:14 -0700 Subject: [PATCH 6/8] Update coveralls to 2.11.12. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f374a903..24a91693 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "platform": "^1.3.1" }, "devDependencies": { - "coveralls": "^2.11.11", + "coveralls": "^2.11.12", "docdown": "~0.6.1", "istanbul": "0.4.4", "qunit-extras": "^2.1.0", From e51399c234be3dbcc9027487585fb9ef2feef191 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 28 Jul 2016 21:26:00 -0700 Subject: [PATCH 7/8] Use `_.invokeMap` instead of `_.invoke`. [closes #157] --- example/jsperf/ui.js | 2 +- plugin/ui.browserscope.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/jsperf/ui.js b/example/jsperf/ui.js index 12a36811..b4306ab4 100644 --- a/example/jsperf/ui.js +++ b/example/jsperf/ui.js @@ -704,7 +704,7 @@ setTimeout(function() { ui.off(); ui.browserscope.post = function() {}; - _.invoke(ui.benchmarks, 'off'); + _.invokeMap(ui.benchmarks, 'off'); }, 1); } diff --git a/plugin/ui.browserscope.js b/plugin/ui.browserscope.js index dfc86309..801bca87 100644 --- a/plugin/ui.browserscope.js +++ b/plugin/ui.browserscope.js @@ -305,7 +305,7 @@ */ function createSnapshot() { // clone benches, exclude those that are errored, unrun, or have hz of Infinity - var benches = _.invoke(filter(ui.benchmarks, 'successful'), 'clone'), + var benches = _.invokeMap(filter(ui.benchmarks, 'successful'), 'clone'), fastest = filter(benches, 'fastest'), slowest = filter(benches, 'slowest'); From b1bb57a7f8f91317284635fb07aea6bb4cf5bb94 Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Fri, 29 Jul 2016 13:29:30 +0200 Subject: [PATCH 8/8] =?UTF-8?q?report=20both=20`slower=20by=20xx%`=20and?= =?UTF-8?q?=20`slower=20by=20a=20factor=20of=20X`=20(shown=20as=20`51%=20s?= =?UTF-8?q?lower=20(=E2=9C=95=202.0)`)=20as=20the=20computer=20is=20better?= =?UTF-8?q?=20at=20calculating=20both=20relative=20indicators=20than=20we?= =?UTF-8?q?=20are,=20and=20we=20can=20use=20our=20brain=20for=20the=20conc?= =?UTF-8?q?lusions=20rather=20than=20the=20calculus.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/jsperf/ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/jsperf/ui.js b/example/jsperf/ui.js index b4306ab4..b65307c2 100644 --- a/example/jsperf/ui.js +++ b/example/jsperf/ui.js @@ -560,10 +560,11 @@ if (_.indexOf(fastest, bench) > -1) { // mark fastest addClass(cell, text); + text += '
(✕ 1)'; } else { text = isFinite(hz) - ? formatNumber(percent < 1 ? percent.toFixed(2) : Math.round(percent)) + '% slower' + ? formatNumber(percent < 1 ? percent.toFixed(2) : Math.round(percent)) + '% slower
(✕ ' + (fastestHz / hz).toFixed(1) + ')' : ''; // mark slowest