()
| 252 | ) |
| 253 | |
| 254 | func (r *Runner) GetMetrics() map[string]any { |
| 255 | latencyMap := make(map[string]float64) |
| 256 | for wsName, ws := range r.workspaces { |
| 257 | latencyMap[wsName] = ws.updateLatency.Seconds() |
| 258 | } |
| 259 | return map[string]any{ |
| 260 | WorkspaceUpdatesLatencyMetric: latencyMap, |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | func (r *Runner) Cleanup(ctx context.Context, id string, logs io.Writer) error { |
| 265 | for i, runner := range r.workspacebuildRunners { |