()
| 59 | |
| 60 | |
| 61 | def get_knative_data(): |
| 62 | xPoints, toProcess = get_processing_list("cold_start_sweep/knative/results/") |
| 63 | |
| 64 | if len(xPoints) == 0: |
| 65 | return [], [], [] |
| 66 | |
| 67 | p50_measurements, p50_std = [], [] |
| 68 | p99_measurements, p99_std = [], [] |
| 69 | warm_start_ratio = [] |
| 70 | |
| 71 | for f in toProcess: |
| 72 | df = pd.read_csv(f) |
| 73 | |
| 74 | warmStartRatio = len(df[df.responseTime < 300_000].index) / len(df.index) |
| 75 | print(f"Ratio of warm starts before filtering: {warmStartRatio}") |
| 76 | |
| 77 | # Filter out warmup phase and warm starts |
| 78 | df = df[(df.phase == 2) & (df.responseTime > 300_000)] |
| 79 | print("Sample size after filtering: ", len(df.index)) |
| 80 | |
| 81 | p50 = df['responseTime'].quantile(0.5) / 1000 # ms |
| 82 | p99 = df['responseTime'].quantile(0.99) / 1000 # ms |
| 83 | p50_measurements.append(p50) |
| 84 | p99_measurements.append(p99) |
| 85 | warm_start_ratio.append(warmStartRatio) |
| 86 | |
| 87 | print("p50: ", p50, "ms") |
| 88 | print("p99: ", p99, "ms") |
| 89 | |
| 90 | print() |
| 91 | |
| 92 | return xPoints, p50_measurements, p99_measurements |
| 93 | |
| 94 | |
| 95 | def get_dirigent_data(technology): |
no test coverage detected