Skip to content

Commit

Permalink
SAM2: Collect p90 latency statistics (#1703)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpuhrsch authored Feb 12, 2025
1 parent 682ffd5 commit aa51486
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 70 deletions.
3 changes: 3 additions & 0 deletions examples/sam2_amg_server/generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def latencies_statistics(data):
mean = np.mean(data_array)
# Calculate the median
median = np.median(data_array)
# Calculate the 90th percentile
p90 = np.percentile(data_array, 90)
# Calculate the 95th percentile
p95 = np.percentile(data_array, 95)
# Calculate the 99th percentile
Expand All @@ -74,6 +76,7 @@ def latencies_statistics(data):
{
"mean": mean,
"median": median,
"p90": p90,
"p95": p95,
"p99": p99,
"p999": p999,
Expand Down
Loading

0 comments on commit aa51486

Please sign in to comment.