Commit eb2ce7b7 authored by Test's avatar Test

.

parent 2d13818e
...@@ -734,7 +734,7 @@ nrunpar() { ...@@ -734,7 +734,7 @@ nrunpar() {
# bench_cpu - microbenchmark CPU # bench_cpu - microbenchmark CPU
bench_cpu() { bench_cpu() {
nrun sh -c "python -m test.pystone |tail -1 |sed -e \ nrun sh -c "python -m test.pystone |tail -1 |sed -e \
\"s|^This machine benchmarks at \([0-9]\+\) pystones/second$|Benchmarkpystone/`hostname` 1 \1 pystone/s|\"" \"s|^This machine benchmarks at \([0-9]\+\) pystones/second$|Benchmark`hostname`/pystone 1 \1 pystone/s|\""
nrun ./tsha1.py 1024 nrun ./tsha1.py 1024
nrun ./tsha1_go 1024 nrun ./tsha1_go 1024
......
...@@ -67,5 +67,5 @@ func main() { ...@@ -67,5 +67,5 @@ func main() {
hostname = "?" hostname = "?"
} }
fmt.Printf("Benchmarksha1/%s/go/%dB %d\t%.3f µs/op\n", hostname, blksize, n, float64(δt) / float64(n) / float64(time.Microsecond)) fmt.Printf("Benchmark%s/sha1/go/%dB %d\t%.3f µs/op\n", hostname, blksize, n, float64(δt) / float64(n) / float64(time.Microsecond))
} }
...@@ -46,9 +46,8 @@ def main(): ...@@ -46,9 +46,8 @@ def main():
tend = time() tend = time()
dt = tend - tstart dt = tend - tstart
# hostname generally != fqdn[0] XXX clarify/refine hostname = socket.gethostname()
hostname = socket.getfqdn().split('.')[0] print('Benchmark%s/sha1/py/%dB %d\t%.3f µs/op' % (hostname, blksize, n, dt * 1E6 / n))
print('Benchmarksha1/%s/py/%dB %d\t%.3f µs/op' % (hostname, blksize, n, dt * 1E6 / n))
if __name__ == '__main__': if __name__ == '__main__':
main() main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment