OILS / benchmarks / osh_runtime.py View on Github | oilshell.org

64 lines, 10 significant
1#!/usr/bin/env python2
2"""
3osh_runtime.py
4
5Extract and merge results from benchmarks/osh-runtime.sh test-oils-run
6
7Structure:
8
9 http://travis-ci.oilshell.org/uuu/osh-runtime/
10 git-96d96a16/
11 2024-05-08__16-11-59.andy-VirtualBox.wwz/
12 osh-runtime/
13 raw/
14 times.tsv
15 provenance.tsv
16
17 2024-05-08__...
18
19 git-1a.../
20 ...
21
22Steps:
23
241. Use zipfile module to extract TSV
252. Merge times.tsv and provenance.tsv
26 - clean up sh_path issue -- use sh_label
273. Concatenate all them into one TSV
28 - devtools/tsv_concat.py
29
30Optionally use web/table/tsv2html
31
32But really we want a web spreadsheet that will load this big denormalized file.
33
34Then we want to
35
36- Select say 5 rows for LEFT
37- Select say 5 rows for RIGHT
38
39Average the times, maybe throw out outliers
40
41Then show diff as VERTICAL table.
42
43Dimensions that can be compared:
44
45- bash vs. osh, or bash vs. dash
46- osh version 1 vs. 2
47- machine 1 vs. machine 2
48- Linux vs OS X
49"""
50from __future__ import print_function
51
52import sys
53
54
55def main(argv):
56 print('Hello from osh_runtime.py')
57
58
59if __name__ == '__main__':
60 try:
61 main(sys.argv)
62 except RuntimeError as e:
63 print('FATAL: %s' % e, file=sys.stderr)
64 sys.exit(1)