milestone 26: upstream health answers for the selected period
This commit is contained in:
@@ -45,6 +45,12 @@ pub const Config = struct {
|
||||
/// `State.window`.
|
||||
pub const window_len = 32;
|
||||
|
||||
/// Bytes kept of an `@errorName`, truncated to fit. Shared rather than repeated:
|
||||
/// `history.Accumulator.Cell` and `upstream_history_repo.WindowStats` carry the
|
||||
/// same name through the minute aggregates, and three buffers of three different
|
||||
/// sizes would truncate one error name three ways.
|
||||
pub const error_name_capacity = 48;
|
||||
|
||||
/// The shift is capped so `base_backoff_ms << shift` cannot run away; by then
|
||||
/// `max_backoff_ms` has clamped the result many doublings ago.
|
||||
const max_shift = 20;
|
||||
@@ -55,7 +61,7 @@ pub const State = struct {
|
||||
total_failures: u64,
|
||||
last_success_at: ?std.Io.Timestamp,
|
||||
last_error_at: ?std.Io.Timestamp,
|
||||
last_error_buf: [48]u8,
|
||||
last_error_buf: [error_name_capacity]u8,
|
||||
/// Length of the `@errorName` held in `last_error_buf`, truncated to fit.
|
||||
last_error_len: u8,
|
||||
backoff_until: ?std.Io.Timestamp,
|
||||
|
||||
Reference in New Issue
Block a user