mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
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.
This commit is contained in:
parent
02b9046a0e
commit
514b7d3359
4 changed files with 1 additions and 58 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue