Merge branch 'upstream-master'
@@ -15,17 +15,17 @@ Dark color scheme:
|
||||
go test -v . -dark
|
||||
```
|
||||
|
||||
### my results:
|
||||
### My results:
|
||||
|
||||
#### Insert
|
||||
| On disk | In memory |
|
||||
| :---------------------------------------- | :--------------------------------------- |
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
#### Select
|
||||
| On disk | In memory |
|
||||
| :---------------------------------------- | :--------------------------------------- |
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
## Adding benchmarks
|
||||
A specific type of benchmark function is currently automated:
|
||||
@@ -39,10 +39,10 @@ You can implement benchmark functions of that type, then add them into ```allBen
|
||||
var allBenchmarksOfNRows = []bechmarkOfNRows{
|
||||
benchmarkInsert,
|
||||
benchmarkSelect,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Elements of ```allBenchmarksOfNRows``` will be automatically evaluated and plotted when alternative plotting runner is used (e.g. ```go run .```)
|
||||
Elements of ```allBenchmarksOfNRows``` will be automatically evaluated and plotted when alternative runner is used.
|
||||
|
||||
To make implemented benchmark available via go-test, you may write a simple stub like following (see [bench_test.go](bench_test.go)):
|
||||
```go
|
||||
|
@@ -95,7 +95,7 @@ func TestBenchmarkAndPlot(t *testing.T) {
|
||||
}
|
||||
|
||||
// render graph into file
|
||||
outputFilename := path.Join("out", fmt.Sprintf("%s_memory:%v.png", getFuncName(benchFunc), isMemoryDB))
|
||||
outputFilename := path.Join("out", fmt.Sprintf("%s_memory_%v.png", getFuncName(benchFunc), isMemoryDB))
|
||||
if err := graph.Render(outputFilename); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |