Skip to content

Commit afca6cc

Browse files
committed
makes the writer payload smaller
1 parent 8a6720e commit afca6cc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/reader/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ func hGetAll(
195195
timeoutCtx, cancel := context.WithTimeout(ctx, timeout)
196196
defer cancel()
197197
start := time.Now()
198-
hGetAllSeconds := metrics.GetOrCreateHistogram(fmt.Sprintf(`kvrocks_command_seconds{command="hgetall",client="%s"}`, client.Name()))
198+
hGetAllSeconds := metrics.GetOrCreateHistogram(fmt.Sprintf(`kvrocks_command_seconds{command="hgetall",conn_client="%s"}`, client.Name()))
199199
defer hGetAllSeconds.UpdateDuration(start)
200200

201201
data, err := client.HGetAll(timeoutCtx, key)
202202
if err != nil {
203-
metrics.GetOrCreateCounter(fmt.Sprintf(`kvrocks_command_errors_total{command="hgetall",client="%s"}`, client.Name())).Inc()
203+
metrics.GetOrCreateCounter(fmt.Sprintf(`kvrocks_command_errors_total{command="hgetall",conn_client="%s"}`, client.Name())).Inc()
204204
return nil, err
205205
}
206206

cmd/reader/reader

-1.76 KB
Binary file not shown.

cmd/writer/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ func main() {
6767
}
6868

6969
logger.Get().Info("creating payload")
70-
payload := []byte("11123123456789123456712312345678912123123456789123456712312345678912345671231234567891234567123123456789123456734567123123456789123456712312345678912345672312345678912345671231234567891212312345678912345671231234567891234567123123456789123456712312345678912345673456712312345678912345671231234567891234567123123456789123456712312345678912123123456789123456712312345678912345671231234567891234567123123456789123456734567123123456789123456712312345678912345672312345678912345671231234567891212312345678912345671231234567891234567123123456789123456712312345678912345673456712312345678912345671231234567891234567")
70+
payload := []byte("123452312345678912345671223456712312345678912345673456712312345678912345671231234567891234567")
7171
payloadSize := len(payload)
7272
data := make(map[string][]byte)
7373
cols := []string{}
74-
for i := 0; i < 8; i++ {
74+
for i := 0; i < 12; i++ {
7575
data[fmt.Sprintf("%d", i)] = payload
7676
cols = append(cols, fmt.Sprintf("%d", i))
7777
}

0 commit comments

Comments
 (0)