Update mgbench to run Diff workflow under 30mins (#730)
This commit is contained in:
parent
eda5213d95
commit
8b834c702c
@ -142,7 +142,7 @@ parser.add_argument(
|
|||||||
with the presence of 300 write queries from write type or 30%""",
|
with the presence of 300 write queries from write type or 30%""",
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument("--tail-latency", type=int, default=100, help="Number of queries for the tail latency statistics")
|
parser.add_argument("--tail-latency", type=int, default=0, help="Number of queries for the tail latency statistics")
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--performance-tracking",
|
"--performance-tracking",
|
||||||
@ -223,8 +223,17 @@ def filter_benchmarks(generators, patterns):
|
|||||||
patterns,
|
patterns,
|
||||||
):
|
):
|
||||||
current[group].append((query_name, query_func))
|
current[group].append((query_name, query_func))
|
||||||
if len(current) > 0:
|
if len(current) == 0:
|
||||||
filtered.append((generator(variant, args.vendor_name), dict(current)))
|
continue
|
||||||
|
|
||||||
|
# Ignore benchgraph "basic" queries in standard CI/CD run
|
||||||
|
for pattern in patterns:
|
||||||
|
res = pattern.count("*")
|
||||||
|
key = "basic"
|
||||||
|
if res >= 2 and key in current.keys():
|
||||||
|
current.pop(key)
|
||||||
|
|
||||||
|
filtered.append((generator(variant, args.vendor_name), dict(current)))
|
||||||
return filtered
|
return filtered
|
||||||
|
|
||||||
|
|
||||||
@ -241,30 +250,34 @@ def warmup(client):
|
|||||||
|
|
||||||
|
|
||||||
def tail_latency(vendor, client, func):
|
def tail_latency(vendor, client, func):
|
||||||
vendor.start_benchmark("tail_latency")
|
|
||||||
if args.warmup_run:
|
|
||||||
warmup(client)
|
|
||||||
latency = []
|
|
||||||
iteration = args.tail_latency
|
iteration = args.tail_latency
|
||||||
query_list = get_queries(func, iteration)
|
if iteration >= 10:
|
||||||
for i in range(0, iteration):
|
vendor.start_benchmark("tail_latency")
|
||||||
ret = client.execute(queries=[query_list[i]], num_workers=1)
|
if args.warmup_run:
|
||||||
latency.append(ret[0]["duration"])
|
warmup(client)
|
||||||
latency.sort()
|
latency = []
|
||||||
query_stats = {
|
|
||||||
"iterations": iteration,
|
query_list = get_queries(func, iteration)
|
||||||
"min": latency[0],
|
for i in range(0, iteration):
|
||||||
"max": latency[iteration - 1],
|
ret = client.execute(queries=[query_list[i]], num_workers=1)
|
||||||
"mean": statistics.mean(latency),
|
latency.append(ret[0]["duration"])
|
||||||
"p99": latency[math.floor(iteration * 0.99) - 1],
|
latency.sort()
|
||||||
"p95": latency[math.floor(iteration * 0.95) - 1],
|
query_stats = {
|
||||||
"p90": latency[math.floor(iteration * 0.90) - 1],
|
"iterations": iteration,
|
||||||
"p75": latency[math.floor(iteration * 0.75) - 1],
|
"min": latency[0],
|
||||||
"p50": latency[math.floor(iteration * 0.50) - 1],
|
"max": latency[iteration - 1],
|
||||||
}
|
"mean": statistics.mean(latency),
|
||||||
print("Query statistics for tail latency: ")
|
"p99": latency[math.floor(iteration * 0.99) - 1],
|
||||||
print(query_stats)
|
"p95": latency[math.floor(iteration * 0.95) - 1],
|
||||||
vendor.stop("tail_latency")
|
"p90": latency[math.floor(iteration * 0.90) - 1],
|
||||||
|
"p75": latency[math.floor(iteration * 0.75) - 1],
|
||||||
|
"p50": latency[math.floor(iteration * 0.50) - 1],
|
||||||
|
}
|
||||||
|
print("Query statistics for tail latency: ")
|
||||||
|
print(query_stats)
|
||||||
|
vendor.stop("tail_latency")
|
||||||
|
else:
|
||||||
|
query_stats = {}
|
||||||
return query_stats
|
return query_stats
|
||||||
|
|
||||||
|
|
||||||
|
@ -147,6 +147,8 @@ def run_full_benchmarks(vendor, binary, dataset_size, dataset_group, realistic,
|
|||||||
"12",
|
"12",
|
||||||
"--no-authorization",
|
"--no-authorization",
|
||||||
"pokec/" + dataset_size + "/" + dataset_group + "/*",
|
"pokec/" + dataset_size + "/" + dataset_group + "/*",
|
||||||
|
"--tail-latency",
|
||||||
|
"100",
|
||||||
]
|
]
|
||||||
|
|
||||||
for config in configurations:
|
for config in configurations:
|
||||||
|
Loading…
Reference in New Issue
Block a user