Skip to content

Commit

Permalink
add meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcloughlin committed Aug 15, 2017
1 parent e167075 commit 707f3df
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ benchmarks_test.go: make_benchmarks.py packages.yaml
results/%.out: benchmarks_test.go
go test -bench $* | grep Benchmark | tee | sort -k3,3n > $@

README.md: README.md.j2 packages.yaml results/EncodeString.out results/EncodeInt.out results/DecodeString.out
README.md: README.md.j2 packages.yaml meta.py results/EncodeString.out results/EncodeInt.out results/DecodeString.out
python meta.py > results/meta.out
j2 --format=yaml $< packages.yaml > $@
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ BenchmarkTomihiltunenDecodeString-4 3000000 602 ns/op
BenchmarkFanixkDecodeString-4 2000000 736 ns/op
```

### Meta

```
$ date
Mon Aug 14 23:44:33 PDT 2017
$ go version
go version go1.8.1 darwin/amd64
$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i7-6660U CPU @ 2.40GHz
```

## Packages Tested

* [mmcloughlin/geohash](https://github.com/mmcloughlin/geohash) ([godoc](https://godoc.org/github.com/mmcloughlin/geohash))
Expand Down
6 changes: 6 additions & 0 deletions README.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Benchmarks to compare golang geohash implementations.
{% include 'results/DecodeString.out' %}
```

### Meta

```
{% include 'results/meta.out' %}
```

## Packages Tested
{% for package in packages -%}
{% set name = '/'.join(package['import'].split('/')[1:]) %}
Expand Down
15 changes: 15 additions & 0 deletions meta.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import subprocess
import sys


COMMANDS = [
'date',
'go version',
'sysctl -n machdep.cpu.brand_string',
]


for cmd in COMMANDS:
print '$', cmd
sys.stdout.flush()
subprocess.check_call(cmd, shell=True)
6 changes: 6 additions & 0 deletions results/meta.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$ date
Mon Aug 14 23:44:33 PDT 2017
$ go version
go version go1.8.1 darwin/amd64
$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i7-6660U CPU @ 2.40GHz

0 comments on commit 707f3df

Please sign in to comment.