update readme
This commit is contained in:
parent
52d3ad065b
commit
b0efe6f165
2 changed files with 20 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ func main() {
|
|||
|
||||
// I will ignore all errors for demonstration purposes
|
||||
|
||||
_, _ = ingester.BulkPush("movies", "general", 2, []sonic.IngestBulkRecord{
|
||||
_, _ = ingester.BulkPush("movies", "general", 3, []sonic.IngestBulkRecord{
|
||||
{"id:6ab56b4kk3", "Star wars"},
|
||||
{"id:5hg67f8dg5", "Spider man"},
|
||||
{"id:1m2n3b4vf6", "Batman"},
|
||||
|
|
|
|||
20
readme.md
20
readme.md
|
|
@ -44,4 +44,22 @@ func main() {
|
|||
|
||||
fmt.Println(results)
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
### Benchmark bulk
|
||||
|
||||
Method BulkPush and BulkPop use custom connection pool with goroutine dispatch algorithm.
|
||||
This is the benchmark (file sonic/ingester_test.go):
|
||||
|
||||
```
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
pkg: github.com/expectedsh/go-sonic/sonic
|
||||
BenchmarkIngesterChannel_BulkPushMaxCPUs-8 2 662657959 ns/op
|
||||
BenchmarkIngesterChannel_BulkPush10-8 2 603779977 ns/op
|
||||
BenchmarkIngesterChannel_Push-8 1 1023322864 ns/op
|
||||
PASS
|
||||
```
|
||||
|
||||
Bulk push is faster than for loop on Push.
|
||||
Hardware detail: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
|
||||
Loading…
Add table
Add a link
Reference in a new issue