Simplify telemetry to three game events
This commit is contained in:
@@ -18,10 +18,7 @@ export function requirementSummary(r: BetaRequirement): string {
|
||||
case 'sustained-population': return `Keep at least ${count(r.minPlayers, 'player')} online for ${duration(r.target)}`;
|
||||
case 'healthy-minutes': return `Stay continuously healthy for ${duration(r.target)}`;
|
||||
case 'failure-budget': return r.target === 0 ? 'Allow no health outages' : `Allow at most ${count(r.target, 'health outage')}`;
|
||||
case 'restart-budget': return r.target === 0 ? 'Allow no unexpected restarts' : `Allow at most ${count(r.target, 'unexpected restart')}`;
|
||||
case 'clean-logs': return r.target === 0 ? 'Allow no detected script errors' : `Allow at most ${count(r.target, 'detected script error')}`;
|
||||
case 'recovery': return `Repeat the checks after ${count(r.target, 'recovery restart')}`;
|
||||
case 'feature': return `Observe ${r.event || 'a named feature event'} ${count(r.target, 'time')}${players}${r.minRound ? ` at round ${r.minRound} or later` : ''}`;
|
||||
case 'manual': return r.label;
|
||||
}
|
||||
}
|
||||
@@ -29,9 +26,9 @@ export function coverageSummary(plan: BetaPlan): string {
|
||||
return plan.scope === 'all' ? 'Every selected server' : plan.scope === 'quorum' ? `At least ${count(plan.quorum, 'selected server')}`
|
||||
: plan.scope === 'map' ? 'One server per selected map' : plan.scope === 'game' ? 'One server per selected game' : 'One server per game / map';
|
||||
}
|
||||
export function needsSessionTelemetry(r: BetaRequirement): boolean {
|
||||
return ['round', 'feature', 'restart-budget'].includes(r.kind) || (r.kind === 'matches' && (r.minRound > 0 || r.minPlayers > 1));
|
||||
export function needsGameTelemetry(r: BetaRequirement): boolean {
|
||||
return ['round', 'matches', 'population', 'populated-minutes', 'player-hours', 'sustained-population'].includes(r.kind);
|
||||
}
|
||||
export function requirementCategory(r: BetaRequirement): string {
|
||||
return r.kind === 'manual' ? 'Tester sign-off' : ['healthy-minutes', 'failure-budget', 'restart-budget', 'clean-logs'].includes(r.kind) ? 'Continuous check' : 'Milestone';
|
||||
return r.kind === 'manual' ? 'Tester sign-off' : ['healthy-minutes', 'failure-budget'].includes(r.kind) ? 'Continuous check' : 'Milestone';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user