Skip to content

Commit aa51486

Browse files
authored
SAM2: Collect p90 latency statistics (#1703)
1 parent 682ffd5 commit aa51486

File tree

2 files changed

+73
-70
lines changed

2 files changed

+73
-70
lines changed

examples/sam2_amg_server/generate_data.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ def latencies_statistics(data):
6060
mean = np.mean(data_array)
6161
# Calculate the median
6262
median = np.median(data_array)
63+
# Calculate the 90th percentile
64+
p90 = np.percentile(data_array, 90)
6365
# Calculate the 95th percentile
6466
p95 = np.percentile(data_array, 95)
6567
# Calculate the 99th percentile
@@ -74,6 +76,7 @@ def latencies_statistics(data):
7476
{
7577
"mean": mean,
7678
"median": median,
79+
"p90": p90,
7780
"p95": p95,
7881
"p99": p99,
7982
"p999": p999,

0 commit comments

Comments
 (0)