UNPKG

@studion/infra-code-blocks

Version:
17 lines 1.32 kB
type TimeUnit = 'ms' | 's' | 'm' | 'h' | 'd' | 'w' | 'y'; type UnitDuration = `${bigint}${TimeUnit}`; /** * PromQL time duration format. Supports floats in seconds (e.g. '90', '1.5'), * unit suffixes (e.g. '30s', '5m', '1h'), and combined durations (e.g. '1h30m'). */ export type TimeRange = `${number}` | UnitDuration | `${UnitDuration}${UnitDuration}`; export declare function getBurnRateQuery(metricQuery: string, target: number): string; export declare function getAvailabilityQuery(namespace: string, timeRange: TimeRange): string; export declare function getAvailabilityPercentageQuery(namespace: string, timeRange: TimeRange): string; export declare function getSuccessRateQuery(namespace: string, timeRange: TimeRange, filter: string): string; export declare function getSuccessPercentageQuery(namespace: string, timeRange: TimeRange, filter: string): string; export declare function getPercentileLatencyQuery(namespace: string, timeRange: TimeRange, percentile: number, filter: string): string; export declare function getLatencyRateQuery(namespace: string, timeRange: TimeRange, threshold: number, filter?: string): string; export declare function getLatencyPercentageQuery(namespace: string, timeRange: TimeRange, threshold: number, filter?: string): string; export {}; //# sourceMappingURL=queries.d.ts.map