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 | |
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.
-rw-r--r-- | website/all_benchmark.html | 3 | ||||
-rw-r--r-- | website/app.js | 42 | ||||
-rw-r--r-- | website/app_test.js | 10 | ||||
-rw-r--r-- | website/index.html | 4 |
4 files changed, 1 insertions, 58 deletions
diff --git a/website/all_benchmark.html b/website/all_benchmark.html index 9512143fc..d17c5bde6 100644 --- a/website/all_benchmark.html +++ b/website/all_benchmark.html @@ -30,9 +30,6 @@ <h2>Syscall count</h2> <div id="syscall-count-chart"></div> - - <h2>Travis</h2> - <div id="travis-compile-time-chart"></div> </main> <script src="https://unpkg.com/d3@5.7.0/dist/d3.min.js"></script> <script src="https://unpkg.com/c3@0.6.7/c3.min.js"></script> 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 - ); -} diff --git a/website/app_test.js b/website/app_test.js index 145e56a85..3ee2c7082 100644 --- a/website/app_test.js +++ b/website/app_test.js @@ -6,8 +6,7 @@ import { createExecTimeColumns, createThreadCountColumns, createSyscallCountColumns, - createSha1List, - getTravisData + createSha1List } from "./app.js"; const regularData = [ @@ -192,10 +191,3 @@ test(function createSha1ListRegularData() { const sha1List = createSha1List(regularData); assertEqual(sha1List, ["abcdef", "012345"]); }); - -testPerm({ net: true }, async function getTravisDataSuccess() { - const data = await getTravisData( - "http://localhost:4545/tools/testdata/travis_benchmark.json" - ); - assert(data.length !== 0); -}); diff --git a/website/index.html b/website/index.html index 6d1b00df1..92584ac60 100644 --- a/website/index.html +++ b/website/index.html @@ -133,10 +133,6 @@ file_server --reload How many total syscalls are performed when executing a given script. <div id="syscall-count-chart"></div> - <h3>Travis</h3> - How long for Travis CI to return a green status for pull requests. - <div id="travis-compile-time-chart"></div> - <h3>References</h3> <p> <a href="./all_benchmark.html">All benchmark data</a> |