1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

Add snapshot_compiler.bin to binary size benchmark (#1611)

This commit is contained in:
Ryan Dahl 2019-01-30 14:01:13 -05:00 committed by GitHub
parent 514b7d3359
commit b9e368cb4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -60,10 +60,16 @@ def get_binary_sizes(build_dir):
"deno": os.path.join(build_dir, "deno" + executable_suffix),
"main.js": os.path.join(build_dir, "gen/bundle/main.js"),
"main.js.map": os.path.join(build_dir, "gen/bundle/main.js.map"),
"snapshot_deno.bin": os.path.join(build_dir, "gen/snapshot_deno.bin")
"compiler.js": os.path.join(build_dir, "gen/bundle/compiler.js"),
"compiler.js.map": os.path.join(build_dir,
"gen/bundle/compiler.js.map"),
"snapshot_deno.bin": os.path.join(build_dir, "gen/snapshot_deno.bin"),
"snapshot_compiler.bin": os.path.join(build_dir,
"gen/snapshot_compiler.bin")
}
sizes = {}
for name, path in path_dict.items():
assert os.path.exists(path)
sizes[name] = os.path.getsize(path)
return sizes

View file

@ -98,7 +98,7 @@ export function createSha1List(data) {
}
export function formatMB(bytes) {
return Math.round(bytes / (1024 * 1024));
return (bytes / (1024 * 1024)).toFixed(2);
}
export function formatReqSec(reqPerSec) {