Type | QPS | Avg(us) | 95th(us) | 99th(us) |
---|---|---|---|---|
Load | 24828.4 | 4002 | 7000 | 9000 |
Update | 5430.2 | 708 | 3000 | 6000 |
99% Read, 1% Insert - Read | 19315.9 | 397 | 1000 | 2000 |
99% Read, 1% Insert - Insert | 2139.0 | 1031 | 2000 | 3000 |
99% Read, 1% Insert, 100 Threads - Read | 36904.7 | 2345 | 4000 | 6000 |
99% Read, 1% Insert, 100 Threads - Insert | 4120.4 | 3081 | 5000 | 7000 |
Read | 28010.3 | 353 | 1000 | 2000 |
Scan 1000 keys | 1960.8 | 327 | 9000 | 10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"sync" | |
"sync/atomic" | |
"testing" | |
) | |
func main() { | |
// Parallel benchmark for text/template.Template.Execute on a single object. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(test)] | |
extern crate test; | |
use std::ops::FnOnce; | |
use std::sync::mpsc; | |
use std::thread; | |
pub trait FnBox { | |
fn call_box(self: Box<Self>); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import re | |
# perf record -F 99 -p $1 -e "sched:sched_stat_runtime" -a -- sleep 20 | |
# perf script -F comm,pid,tid,cpu,time | python cpu_tenancy.py | |
# | |
# time-monitor-wo 79618/79634 [007] 11994704.695317: | |
# grpc-server-1 79618/79954 [006] 11994704.717969: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package prefix_access | |
import ( | |
"bytes" | |
"encoding/binary" | |
"testing" | |
) | |
func hasPrefix(buf []byte, prefix []byte) bool { | |
return buf[0] == prefix[0] && buf[1] == prefix[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Status read(String table, String key, Set<String> fields, | |
Map<String, ByteIterator> result) { | |
try (final TraceScope span = tracer.newScope(scopeStringRead)) { | |
long ist = measurements.getIntendedtartTimeNs(); | |
long st = System.nanoTime(); | |
Status res = db.read(table, key, fields, result); | |
long en = System.nanoTime(); | |
measure("READ", res, ist, st, en); | |
measurements.reportStatus("READ", res); | |
return res; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void throttleNanos(long startTimeNanos) { | |
//throttle the operations | |
if (_targetOpsPerMs > 0) | |
{ | |
// delay until next tick | |
long deadline = startTimeNanos + _opsdone*_targetOpsTickNs; | |
sleepUntil(deadline); | |
_measurements.setIntendedStartTimeNs(deadline); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (db *fDB) Read(ctx context.Context, table string, key string, fields []string) (map[string][]byte, error) { | |
rowKey := db.getRowKey(table, key) | |
row, err := db.db.Transact(func(tr fdb.Transaction) (interface{}, error) { | |
f := tr.Get(fdb.Key(rowKey)) | |
return f.Get() | |
}) | |
if err != nil { | |
return nil, err | |
} else if row == nil { |
One FoundationDB, One TiKV.
recordcount=1000000
operationcount=1000000
workload=core
fieldcount=1
fieldlength=16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
probe begin { | |
warn("Begin to trace jemalloc.\n") | |
} | |
probe process.function("malloc").return, | |
process.function("mallocx").return{ | |
if (pid() != target()) next | |
printf("malloc: %p, bytes: %d\n", $return, @entry($size)) | |