diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-07-16 15:55:02 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-07-16 15:55:02 +0300 |
commit | 07457423dd8df274dd6e03aa17fd52fefe3a1bc6 (patch) | |
tree | c98ef3ec6820f235848221b50279f520fb451a5c | |
parent | f7f0e7bd90445cf8dc8b234618f07a46596c8364 (diff) | |
download | obnam-benchmarks-07457423dd8df274dd6e03aa17fd52fefe3a1bc6.tar.gz |
Add CSS for benchmark pages
-rw-r--r-- | benchmark.css | 11 | ||||
-rwxr-xr-x | obbench | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/benchmark.css b/benchmark.css new file mode 100644 index 0000000..0f4468f --- /dev/null +++ b/benchmark.css @@ -0,0 +1,11 @@ +table { + border: solid 1px; +} +th { + border-bottom: solid 1px; +} +th, td { + border-right: solid 1px; + text-align: right; + font-family: monospace; +} @@ -160,6 +160,7 @@ class ObnamBenchmarker(cliapp.Application): for obj in objs: self.write_benchmark_page(spec, obj) self.write_summary_page(spec, objs) + self.copy_css_file(spec) def read_results_files(self, spec): objs = [] @@ -182,6 +183,8 @@ class ObnamBenchmarker(cliapp.Application): '<title>Obnam benchmark: {commit} {name}</title>\n'.format( commit=self.q(obj['commit_id']), name=self.q(obj['name']))) + f.write('<link rel="stylesheet" href="benchmark.css"\n') + f.write(' type="text/css" />\n') f.write('</head>\n') f.write('<body>\n') @@ -228,6 +231,8 @@ class ObnamBenchmarker(cliapp.Application): f.write('<head>\n') f.write('<title>Obnam benchmark: summary</title>\n') + f.write('<link rel="stylesheet" href="benchmark.css"\n') + f.write(' type="text/css" />\n') f.write('</head>\n') f.write('<body>\n') @@ -293,6 +298,10 @@ class ObnamBenchmarker(cliapp.Application): return runs + def copy_css_file(self, spec): + filename = os.path.join(spec['html_dir'], 'benchmark.css') + shutil.copy('benchmark.css', filename) + class BenchmarkResult(object): |