From 187310a3e151303504a1dc5830334ae7ac1fef57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 28 Jul 2019 12:11:08 +0200 Subject: benchmarks: add bundle size (#2690) --- website/app.ts | 10 ++++++++++ website/benchmarks.html | 25 ++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) (limited to 'website') diff --git a/website/app.ts b/website/app.ts index c93ed0986..326e02f63 100644 --- a/website/app.ts +++ b/website/app.ts @@ -108,10 +108,18 @@ export function createSyscallCountColumns(data) { ]); } +export function createBundleSizeColumns(data) { + return createColumns(data, "bundle_size"); +} + export function createSha1List(data) { return data.map(d => d.sha1); } +export function formatKB(bytes) { + return (bytes / 1024).toFixed(2); +} + export function formatMB(bytes) { return (bytes / (1024 * 1024)).toFixed(2); } @@ -247,6 +255,7 @@ export async function drawChartsFromBenchmarkData(dataUrl) { const binarySizeColumns = createBinarySizeColumns(data); const threadCountColumns = createThreadCountColumns(data); const syscallCountColumns = createSyscallCountColumns(data); + const bundleSizeColumns = createBundleSizeColumns(data); const sha1List = createSha1List(data); const sha1ShortList = sha1List.map(sha1 => sha1.substring(0, 6)); @@ -277,6 +286,7 @@ export async function drawChartsFromBenchmarkData(dataUrl) { gen("#binary-size-chart", binarySizeColumns, "megabytes", formatMB); gen("#thread-count-chart", threadCountColumns, "threads"); gen("#syscall-count-chart", syscallCountColumns, "syscalls"); + gen("#bundle-size-chart", bundleSizeColumns, "kilobytes", formatKB); } export function main(): void { diff --git a/website/benchmarks.html b/website/benchmarks.html index 8b2b44d72..68e1fa57d 100644 --- a/website/benchmarks.html +++ b/website/benchmarks.html @@ -221,11 +221,34 @@

How many threads various programs use.

-

Syscall count #

+

Syscall count #

How many total syscalls are performed when executing a given script.

+ +

Bundle size #

+

+ Size of different bundled scripts. +

+ + + +
-- cgit v1.2.3