diff options
| author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2018-09-24 23:58:18 -0400 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-24 23:58:18 -0400 |
| commit | d957f8ebc24bcbdb94c0c5297c0072aa8d2ebec8 (patch) | |
| tree | 46392609e261833733b463eec5a1e16be79cc71a /website/app.js | |
| parent | 234d5ea780d8621866da87097c78ec10167cbdc5 (diff) | |
Add syscall count benchmark for 002_hello.ts (#820)
* Add syscall count tracking for benchmark
* Add fetch_deps thread benchmark
* Switch to `strace -c` for syscall parsing
* Spawn http_server during benchmark (for fetch)
* Rename `benchmarks` to `exec_time_benchmarks`
* Update app_test.js
Diffstat (limited to 'website/app.js')
| -rw-r--r-- | website/app.js | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/website/app.js b/website/app.js index 27baa1958..ba8dbac36 100644 --- a/website/app.js +++ b/website/app.js @@ -20,7 +20,7 @@ export function createBinarySizeColumns(data) { return [["binary_size", ...data.map(d => d.binary_size || 0)]]; } -const threadCountNames = ["set_timeout"]; +const threadCountNames = ["set_timeout", "fetch_deps"]; export function createThreadCountColumns(data) { return threadCountNames.map(name => [ name, @@ -34,6 +34,20 @@ export function createThreadCountColumns(data) { ]); } +const syscallCountNames = ["hello"]; +export function createSyscallCountColumns(data) { + return syscallCountNames.map(name => [ + name, + ...data.map(d => { + const syscallCountData = d["syscall_count"]; + if (!syscallCountData) { + return 0; + } + return syscallCountData[name] || 0; + }) + ]); +} + export function createSha1List(data) { return data.map(d => d.sha1); } @@ -55,6 +69,7 @@ export async function main() { const execTimeColumns = createExecTimeColumns(data); const binarySizeColumns = createBinarySizeColumns(data); const threadCountColumns = createThreadCountColumns(data); + const syscallCountColumns = createSyscallCountColumns(data); const sha1List = createSha1List(data); c3.generate({ @@ -94,4 +109,15 @@ export async function main() { } } }); + + c3.generate({ + bindto: "#syscall-count-chart", + data: { columns: syscallCountColumns }, + axis: { + x: { + type: "category", + categories: sha1List + } + } + }); } |
