Permalink
Browse files

Link to raw timing data from the osh-parser report.

  • Loading branch information...
Andy Chu
Andy Chu committed Nov 7, 2017
1 parent b989ecb commit 4c3df4052da971f3169a3814283b627bdf4d5bc3
Showing with 25 additions and 3 deletions.
  1. +18 −2 benchmarks/osh-parser.R
  2. +7 −1 benchmarks/osh-parser.sh
View
@@ -25,6 +25,7 @@ main = function(argv) {
# Merge all the inputs
hosts = list()
raw_times_list = list()
for (i in 2:length(argv)) {
times_path = argv[[i]]
# Find it in the same directory
@@ -50,6 +51,7 @@ main = function(argv) {
host_rows
hosts[[i-1]] = host_rows
raw_times_list[[i-1]] = times_path
}
all_times = bind_rows(hosts)
@@ -138,27 +140,41 @@ main = function(argv) {
Log('RATE')
print(rate)
# TODO: Set up cgit because Github links are slow.
benchmarkDataLink = function(subdir, name, suffix) {
#sprintf('../../../../benchmark-data/shell-id/%s', shell_id)
sprintf('https://github.com/oilshell/benchmark-data/blob/master/%s/%s%s',
subdir, name, suffix)
}
# Should be:
# host_id_url
# And then csv_to_html will be smart enough? It should take --url flag?
host_table = data_frame(
host_label = distinct_hosts$host_label,
host_id = paste(distinct_hosts$host_name,
distinct_hosts$host_hash, sep='-'),
host_id_HREF = sprintf('../../../../benchmark-data/host-id/%s', host_id)
host_id_HREF = benchmarkDataLink('host-id', host_id, '/')
)
print(host_table)
shell_table = data_frame(
shell_label = distinct_shells$shell_label,
shell_id = paste(distinct_shells$shell_name,
distinct_shells$shell_hash, sep='-'),
shell_id_HREF = sprintf('../../../../benchmark-data/shell-id/%s', shell_id)
shell_id_HREF = benchmarkDataLink('shell-id', shell_id, '/')
)
print(shell_table)
raw_times = data_frame(
filename = basename(as.character(raw_times_list)),
filename_HREF = benchmarkDataLink('osh-parser', filename, '')
)
print(raw_times)
writeCsv(host_table, file.path(out_dir, 'hosts'))
writeCsv(shell_table, file.path(out_dir, 'shells'))
writeCsv(raw_times, file.path(out_dir, 'raw_times'))
writeCsv(shell_summary, file.path(out_dir, 'summary'))
writeCsv(elapsed, file.path(out_dir, 'elapsed'))
writeCsv(rate, file.path(out_dir, 'rate'))
View
@@ -142,6 +142,7 @@ run() {
echo "Wrote $out"
}
# TODO:
summarize() {
local out=_tmp/osh-parser/stage1
mkdir -p $out
@@ -195,7 +196,7 @@ _print-report() {
}
/* these two tables are side by side */
#shells, #hosts {
#shells, #hosts, #raw_times {
display: inline-block;
vertical-align: top;
}
@@ -235,6 +236,11 @@ EOF
EOF
web/table/csv2html.py $BASE_DIR/stage1/shells.csv
web/table/csv2html.py $BASE_DIR/stage1/hosts.csv
cat <<EOF
<h3>Raw Timing Data</h3>
EOF
web/table/csv2html.py $BASE_DIR/stage1/raw_times.csv
cat <<EOF
<h3>Per-File Breakdown</h3>

0 comments on commit 4c3df40

Please sign in to comment.