Execution Result
ExecutionResult
dataclass
Metrics from a single execution (simulation or live run).
Source code in src/autoslo/workload_execution/execution_result.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
violation_for_metric(metric)
Return the violation for the given metric.
Source code in src/autoslo/workload_execution/execution_result.py
load(execution_dir, slo_resolver=None, tail_fraction=1.0, min_cluster_index=None)
staticmethod
Load an :class:ExecutionResult from a run output directory.
Works for both simulation directories (data/simulator_runs/<id>/)
and live run directories (data/runs/<id>/).
Parameters
execution_dir :
Path to the run output directory.
slo_resolver :
Optional pre-built resolver. When omitted, one is constructed
from execution_config.yml in execution_dir.
tail_fraction :
Violation metrics are computed only over the last
tail_fraction fraction of queries (ordered by arrival time).
Must be in (0, 1]. Default uses all queries.
Mutually exclusive with min_cluster_index.
min_cluster_index :
If set, only include queries that arrived at or after the time
the cluster with this counter index became ready. Prints a warning
if no matching cluster is found in the structured
log. Mutually exclusive with tail_fraction.
Source code in src/autoslo/workload_execution/execution_result.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
_compute_cost_live_run(execution_dir, start_time_cutoff=None)
Sum billed cost across clusters from sys_serverless_usage+*.parquet files.
Parameters
execution_dir :
Path to the run output directory.
start_time_cutoff :
If provided, only rows whose start_time is at or after this
timestamp contribute to the cost. Rows that predate the cutoff are
assumed to belong to a warm-up period outside the measured window.
Raises
FileNotFoundError
If no sys_serverless_usage+*.parquet files exist in execution_dir.
This indicates that RunStatsCollector has not yet completed; callers
should only invoke :meth:ExecutionResult.load after stats collection
is done.