diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-01-30 13:28:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-30 13:28:55 -0500 |
commit | 514b7d335977eda1b7b110d3ad5f9f93ac60af5b (patch) | |
tree | 8a4ae9ef9296d91540ee511572f56aec1057fc1f /website/app.js | |
parent | 02b9046a0e9a99ee42e889daa81a1e90641e6434 (diff) |
Remove Travis benchmark (#1617)
- We don't look at this benchmark because it jumps around. It isn't
stable so doesn't feel trustable.
- It requires an extra request for every homepage visit. This is
excessive.
- I would gladly reintroduce it if we could store the results of the API
call into a JSON file like we do with other benchmarks.
Diffstat (limited to 'website/app.js')
-rw-r--r-- | website/app.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/website/app.js b/website/app.js index cf5734136..359fbf1ae 100644 --- a/website/app.js +++ b/website/app.js @@ -4,18 +4,6 @@ export async function getJson(path) { return (await fetch(path)).json(); } -export async function getTravisData( - url = "https://api.travis-ci.com/repos/denoland/deno/builds?event_type=pull_request" -) { - const res = await fetch(url, { - headers: { - Accept: "application/vnd.travis-ci.2.1+json" - } - }); - const data = await res.json(); - return data.builds.reverse(); -} - function getBenchmarkVarieties(data, benchmarkName) { // Look at last sha hash. const last = data[data.length - 1]; @@ -105,10 +93,6 @@ export function createSyscallCountColumns(data) { ]); } -function createTravisCompileTimeColumns(data) { - return [["duration_time", ...data.map(d => d.duration)]]; -} - export function createSha1List(data) { return data.map(d => d.sha1); } @@ -190,7 +174,6 @@ export function drawCharts(dataUrl) { dataUrl = "https://denoland.github.io/deno/" + dataUrl; } drawChartsFromBenchmarkData(dataUrl); - drawChartsFromTravisData(); } /** @@ -233,28 +216,3 @@ export async function drawChartsFromBenchmarkData(dataUrl) { gen("#thread-count-chart", threadCountColumns, "threads"); gen("#syscall-count-chart", syscallCountColumns, "syscalls"); } - -/** - * Draws the charts from travis' API data. - */ -export async function drawChartsFromTravisData() { - const viewPullRequestOnClick = _prNumberList => d => { - // @ts-ignore - window.open( - `https://github.com/denoland/deno/pull/${_prNumberList[d["index"]]}` - ); - }; - - const travisData = (await getTravisData()).filter(d => d.duration > 0); - const travisCompileTimeColumns = createTravisCompileTimeColumns(travisData); - const prNumberList = travisData.map(d => d.pull_request_number); - - generate( - "#travis-compile-time-chart", - prNumberList, - travisCompileTimeColumns, - viewPullRequestOnClick(prNumberList), - "minutes", - formatSecsAsMins - ); -} |