Skip to content

Commit bc0d6c5

Browse files
committed
Addressed config linter erros WRT to tested groups on default memtier benchmark
1 parent 95ef953 commit bc0d6c5

File tree

1 file changed

+15
-0
lines changed
  • redis_benchmarks_specification/__cli__

1 file changed

+15
-0
lines changed

redis_benchmarks_specification/__cli__/stats.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
101101
if is_memtier:
102102
arguments = benchmark_config["clientconfig"]["arguments"]
103103
arguments_split = arguments.split("--command")
104+
105+
if len(arguments_split) == 1:
106+
# this means no arbitrary command is being used so we default to memtier default group, which is 'string'
107+
tested_groups.append("string")
108+
104109
for command_part in arguments_split[1:]:
105110
command_part = command_part.strip()
106111
command_p = command_part.split(" ", 1)[0]
@@ -248,6 +253,8 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
248253
for row in csv_reader:
249254
if len(row) == 0:
250255
continue
256+
if "cmdstat_" not in row[0]:
257+
continue
251258
# row variable is a list that represents a row in csv
252259
cmdstat = row[0]
253260
cmdstat = cmdstat.replace("cmdstat_", "")
@@ -323,8 +330,10 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
323330
"usecs",
324331
"tracked",
325332
"deprecated",
333+
"usec_per_call",
326334
"% count",
327335
"% usecs",
336+
"diff count usecs",
328337
]
329338
import csv
330339

@@ -339,10 +348,16 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
339348
usec = row[3]
340349
pct = count / total_count
341350
pct_usec = "n/a"
351+
usec_per_call = "n/a"
352+
diff_pct = "n/a"
342353
if usec is not None:
343354
pct_usec = usec / total_usecs
355+
usec_per_call = float(usec) / float(count)
356+
diff_pct = pct_usec - pct
357+
row.append(usec_per_call)
344358
row.append(pct)
345359
row.append(pct_usec)
360+
row.append(pct_usec)
346361
writer.writerow(row)
347362

348363
if total_tracked_count > 0:

0 commit comments

Comments
 (0)