Permalink
Browse files

Calculate native code size (bundle size - bytecode size).

Also:

- Fix TSV header
- Change csv2html --css-class-pattern to use unanchored matches
  (re.search)
  • Loading branch information...
Andy Chu
Andy Chu committed Feb 17, 2018
1 parent bc2de38 commit 4643b79421521d4da1a5393ae55fefde76f55d0b
Showing with 22 additions and 10 deletions.
  1. +6 −4 benchmarks/ovm-build.sh
  2. +15 −5 benchmarks/report.R
  3. +1 −1 web/table/csv2html.py
View
@@ -267,7 +267,7 @@ measure() {
# TODO: the $times_out calculation is duplicated in build-task()0
# Write Header of the CSV file that is appended to.
echo $HEADER > $times_out
echo "$HEADER" > $times_out
local t1=$BASE_DIR/oil-tasks.txt
local t2=$BASE_DIR/other-shell-tasks.txt
@@ -358,13 +358,15 @@ EOF
<p>The oil binary has two portions:
<ol>
<li>Architecture-independent <code>bytecode.zip</code></li>
<li>Architecture- and compiler- dependent <code>_build/oil/ovm*</code></li>
<li>Architecture- and compiler- dependent native code
(<code>_build/oil/ovm*</code>)
</li>
</ol>
</p>
EOF
tsv2html $in_dir/bytecode-size.tsv
tsv2html $in_dir/bin-sizes.tsv
# Highlight the "default" production build
tsv2html --css-class-pattern 'special /gcc/oil.ovm$' $in_dir/sizes.tsv
cat <<EOF
View
@@ -394,8 +394,8 @@ OvmBuildReport = function(in_dir, out_dir) {
times %>% distinct(compiler_path, compiler_hash) -> distinct_compilers
distinct_compilers$compiler_label = basename(distinct_compilers$compiler_path)
print(distinct_hosts)
print(distinct_compilers)
#print(distinct_hosts)
#print(distinct_compilers)
WriteOvmBuildDetails(distinct_hosts, distinct_compilers, out_dir)
@@ -411,11 +411,21 @@ OvmBuildReport = function(in_dir, out_dir) {
#print(times)
bytecode_size %>%
rename(bytecode_size = num_bytes) %>%
select(-c(path)) ->
bytecode_size
bin_sizes %>%
# reorder
select(c(host_label, path, num_bytes)) %>%
left_join(bytecode_size, by = c('host_label')) %>%
mutate(native_code_size = num_bytes - bytecode_size) ->
sizes
# NOTE: These don't have the host and compiler.
writeTsv(bytecode_size, file.path(out_dir, 'bytecode-size'))
writeTsv(bin_sizes, file.path(out_dir, 'bin-sizes'))
writeTsv(times, file.path(out_dir, 'times'))
writeTsv(sizes, file.path(out_dir, 'sizes'))
# TODO: I want a size report too
#writeCsv(sizes, file.path(out_dir, 'sizes'))
View
@@ -255,7 +255,7 @@ def PrintTable(css_id, schema, col_names, rows, css_class_pattern):
row_class = ''
if cell_regex:
for cell in row:
if cell_regex.match(cell):
if cell_regex.search(cell):
row_class = 'class="%s"' % css_class
break

0 comments on commit 4643b79

Please sign in to comment.