Merge branch 'upstream-master'

This commit is contained in:
glebarez
2021-12-23 17:40:29 +01:00
6 changed files with 6 additions and 6 deletions

View File

@@ -15,17 +15,17 @@ Dark color scheme:
go test -v . -dark
```
### my results:
### My results:
#### Insert
| On disk | In memory |
| :---------------------------------------- | :--------------------------------------- |
| ![](out/benchmarkInsert_memory:false.png) | ![](out/benchmarkInsert_memory:true.png) |
| ![](out/benchmarkInsert_memory_false.png) | ![](out/benchmarkInsert_memory_true.png) |
#### Select
| On disk | In memory |
| :---------------------------------------- | :--------------------------------------- |
| ![](out/benchmarkSelect_memory:false.png) | ![](out/benchmarkSelect_memory:true.png) |
| ![](out/benchmarkSelect_memory_false.png) | ![](out/benchmarkSelect_memory_true.png) |
## Adding benchmarks
A specific type of benchmark function is currently automated:
@@ -42,7 +42,7 @@ var allBenchmarksOfNRows = []bechmarkOfNRows{
}
```
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

View File

@@ -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)
}

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB