Skip to content

Instantly share code, notes, and snippets.

@Preetam
Created May 27, 2014 19:45
Show Gist options
  • Save Preetam/7fda73b4b0b169f77e3f to your computer and use it in GitHub Desktop.
Save Preetam/7fda73b4b0b169f77e3f to your computer and use it in GitHub Desktop.

DigitalOcean 4 GB RAM droplet with SSD

root@test:~# ./listmap.test -test.v -test.bench="Benchmark.*" -test.benchtime=5s
=== RUN Test1
=== RUN Test2
=== RUN Test3
=== RUN TestRemove
=== RUN TestSequentialShort
--- PASS: TestSequentialShort (0.00 seconds)
	listmap_test.go:138: Time to insert 2048 sequential integers: 3.991335ms
=== RUN TestSequentialLong
=== RUN TestRead
--- PASS: TestRead (0.00 seconds)
=== RUN TestRandomShort
=== RUN TestRandomLong
=== RUN TestConcurrentSequential
=== RUN TestConcurrentSequential2
=== RUN TestConcurrentRandom
--- PASS: Test1 (0.00 seconds)
--- PASS: Test2 (0.00 seconds)
--- PASS: Test3 (0.00 seconds)
--- PASS: TestRemove (0.00 seconds)
--- PASS: TestSequentialLong (0.04 seconds)
	listmap_test.go:155: Time to insert 16384 sequential integers: 34.574977ms
--- PASS: TestRandomShort (0.04 seconds)
	listmap_test.go:206: Time to insert 2048 random integers: 37.521759ms
--- PASS: TestRandomLong (2.58 seconds)
	listmap_test.go:223: Time to insert 16384 random integers: 2.579838151s
--- PASS: TestConcurrentSequential (0.79 seconds)
--- PASS: TestConcurrentSequential2 (8.82 seconds)
--- PASS: TestConcurrentRandom (0.69 seconds)
PASS
BenchmarkSequentialWrites                  5000000  1829 ns/op
BenchmarkRandomWrites                      100000   1300068 ns/op
BenchmarkSequentialWritesWithVerification  5000000  1925 ns/op
BenchmarkRandomWritesWithVerification      100000   1365255 ns/op

ThinkPad with 4 GB RAM and HDD

  ∂ [listmap] (master): ./listmap.test -test.v -test.bench="Benchmark.*" -test.benchtime=5s
=== RUN Test1
=== RUN Test2
=== RUN Test3
=== RUN TestRemove
=== RUN TestSequentialShort
--- PASS: TestSequentialShort (0.03 seconds)
	listmap_test.go:138: Time to insert 2048 sequential integers: 10.063451ms
=== RUN TestSequentialLong
=== RUN TestRead
--- PASS: TestRead (0.00 seconds)
=== RUN TestRandomShort
=== RUN TestRandomLong
=== RUN TestConcurrentSequential
=== RUN TestConcurrentSequential2
=== RUN TestConcurrentRandom
--- PASS: Test1 (0.00 seconds)
--- PASS: Test2 (0.00 seconds)
--- PASS: Test3 (0.00 seconds)
--- PASS: TestRemove (0.00 seconds)
--- PASS: TestSequentialLong (0.03 seconds)
	listmap_test.go:155: Time to insert 16384 sequential integers: 24.496358ms
--- PASS: TestRandomShort (0.03 seconds)
	listmap_test.go:206: Time to insert 2048 random integers: 31.110055ms
--- PASS: TestRandomLong (1.75 seconds)
	listmap_test.go:223: Time to insert 16384 random integers: 1.747945935s
--- PASS: TestConcurrentSequential (0.59 seconds)
--- PASS: TestConcurrentSequential2 (6.52 seconds)
--- PASS: TestConcurrentRandom (0.48 seconds)
PASS
BenchmarkSequentialWrites                  5000000  1480 ns/op
BenchmarkRandomWrites                      100000   1015103 ns/op
BenchmarkSequentialWritesWithVerification  5000000  1631 ns/op
BenchmarkRandomWritesWithVerification      100000   1175730 ns/op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment