mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 12:58:54 -05:00
Add snapshot_compiler.bin to binary size benchmark (#1611)
This commit is contained in:
parent
514b7d3359
commit
b9e368cb4c
2 changed files with 8 additions and 2 deletions
|
@ -60,10 +60,16 @@ def get_binary_sizes(build_dir):
|
||||||
"deno": os.path.join(build_dir, "deno" + executable_suffix),
|
"deno": os.path.join(build_dir, "deno" + executable_suffix),
|
||||||
"main.js": os.path.join(build_dir, "gen/bundle/main.js"),
|
"main.js": os.path.join(build_dir, "gen/bundle/main.js"),
|
||||||
"main.js.map": os.path.join(build_dir, "gen/bundle/main.js.map"),
|
"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 = {}
|
sizes = {}
|
||||||
for name, path in path_dict.items():
|
for name, path in path_dict.items():
|
||||||
|
assert os.path.exists(path)
|
||||||
sizes[name] = os.path.getsize(path)
|
sizes[name] = os.path.getsize(path)
|
||||||
return sizes
|
return sizes
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ export function createSha1List(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatMB(bytes) {
|
export function formatMB(bytes) {
|
||||||
return Math.round(bytes / (1024 * 1024));
|
return (bytes / (1024 * 1024)).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatReqSec(reqPerSec) {
|
export function formatReqSec(reqPerSec) {
|
||||||
|
|
Loading…
Reference in a new issue