results

command
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

README

Visualising Benchmarks

We are using oremi for visualising the benchmarks

This includes 2 steps

  • parse the file into benchmarks
file := flag.String("file", "store/benchmark/results/benchmark_hashtable.txt", "bench output file")

	benchmarks, err := bench.New(*file)

	oremi.Draw("benchmarks", layout.Horizontal, 1400, 800, gatherBenchmarks(benchmarks))
  • gather and filter the relevant values for the visualisation graph
graphs := make(map[string]bench.Benchmarks)
	colors := bench.Palette(10)

	for _, b := range benchmarks {
		label := b.Labels()[0]
		i := strings.Index(label, "/")
		l := label[0:i]
		if _, ok := graphs[l]; !ok {
			graphs[l] = make([]bench.Benchmark, 0)
		}
		graphs[l] = append(graphs[l], b)
	}

	collections := make(map[string]map[string]oremi.Collection)
	collections["latency"] = make(map[string]oremi.Collection)
	for label, graph := range graphs {
		collections["latency"][label] = graph.
            Extract(bench.Key, 
                    bench.Latency, 
                    bench.Include(map[string]float64{bench.Num: 1000}), 
                    bench.Exclude(map[string]float64{bench.Key: 16})).
			Color(colors.Get(label))
	}
	return collections

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL