[Release Test] Add perf metrics for core scalability tests (#23110)

* Add perf metrics for core scalability tests

* lint
This commit is contained in:
Jiajun Yao 2022-03-13 18:20:39 -07:00 committed by GitHub
parent 86b79b68be
commit e4620669a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 0 deletions

View file

@ -5,10 +5,12 @@ import ray._private.test_utils as test_utils
import time
import tqdm
is_smoke_test = True
if "SMOKE_TEST" in os.environ:
MAX_ACTORS_IN_CLUSTER = 100
else:
MAX_ACTORS_IN_CLUSTER = 10000
is_smoke_test = False
def test_max_actors():
@ -66,4 +68,12 @@ if "TEST_OUTPUT_JSON" in os.environ:
"_peak_memory": round(used_gb, 2),
"_peak_process_memory": usage,
}
if not is_smoke_test:
results["perf_metrics"] = [
{
"perf_metric_name": "actors_per_second",
"perf_metric_value": rate,
"perf_metric_type": "THROUGHPUT",
}
]
json.dump(results, out_file)

View file

@ -6,10 +6,12 @@ from ray.util.placement_group import placement_group, remove_placement_group
import time
import tqdm
is_smoke_test = True
if "SMOKE_TEST" in os.environ:
MAX_PLACEMENT_GROUPS = 20
else:
MAX_PLACEMENT_GROUPS = 1000
is_smoke_test = False
def test_many_placement_groups():
@ -92,4 +94,12 @@ if "TEST_OUTPUT_JSON" in os.environ:
"_peak_memory": round(used_gb, 2),
"_peak_process_memory": usage,
}
if not is_smoke_test:
results["perf_metrics"] = [
{
"perf_metric_name": "pgs_per_second",
"perf_metric_value": rate,
"perf_metric_type": "THROUGHPUT",
}
]
json.dump(results, out_file)

View file

@ -62,4 +62,12 @@ if "TEST_OUTPUT_JSON" in os.environ:
"num_nodes": NUM_NODES,
"success": "1",
}
perf_metric_name = f"time_to_broadcast_{OBJECT_SIZE}_bytes_to_{NUM_NODES}_nodes"
results["perf_metrics"] = [
{
"perf_metric_name": perf_metric_name,
"perf_metric_value": end - start,
"perf_metric_type": "LATENCY",
}
]
json.dump(results, out_file)

View file

@ -206,4 +206,31 @@ if "TEST_OUTPUT_JSON" in os.environ:
"large_object_size": MAX_RAY_GET_SIZE,
"success": "1",
}
results["perf_metrics"] = [
{
"perf_metric_name": f"{MAX_ARGS}_args_time",
"perf_metric_value": args_time,
"perf_metric_type": "LATENCY",
},
{
"perf_metric_name": f"{MAX_RETURNS}_returns_time",
"perf_metric_value": returns_time,
"perf_metric_type": "LATENCY",
},
{
"perf_metric_name": f"{MAX_RAY_GET_ARGS}_get_time",
"perf_metric_value": get_time,
"perf_metric_type": "LATENCY",
},
{
"perf_metric_name": f"{MAX_QUEUED_TASKS}_queued_time",
"perf_metric_value": queued_time,
"perf_metric_type": "LATENCY",
},
{
"perf_metric_name": f"{MAX_RAY_GET_SIZE}_large_object_time",
"perf_metric_value": large_object_time,
"perf_metric_type": "LATENCY",
},
]
json.dump(results, out_file)