Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 41 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ members = [
rand = "0.8"
regex = "1.4"
rstest = "0.26.1"
rusqlite = { version = "0.32.1", features = [ "bundled" ] }
rustls-pemfile = "2.2.0"
rustyline = "15.0.0"
scc = "3.6.12"
Expand Down
2 changes: 2 additions & 0 deletions engine/packages/pegboard-envoy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ serde_bare.workspace = true
serde_json.workspace = true
serde.workspace = true
sqlite-storage.workspace = true
tempfile.workspace = true
tokio-tungstenite.workspace = true
tokio.workspace = true
tracing.workspace = true
universaldb.workspace = true
universalpubsub.workspace = true
url.workspace = true
vbare.workspace = true
rusqlite.workspace = true

pegboard.workspace = true
namespace.workspace = true
33 changes: 33 additions & 0 deletions engine/packages/pegboard-envoy/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,37 @@ lazy_static::lazy_static! {
BUCKETS.to_vec(),
*REGISTRY
).unwrap();

pub static ref SQLITE_MIGRATION_ATTEMPTS_TOTAL: IntCounter = register_int_counter_with_registry!(
"pegboard_envoy_sqlite_migration_attempts_total",
"Total number of sqlite v1 to v2 migration attempts.",
*REGISTRY
).unwrap();

pub static ref SQLITE_MIGRATION_SUCCESSES_TOTAL: IntCounter = register_int_counter_with_registry!(
"pegboard_envoy_sqlite_migration_successes_total",
"Total number of sqlite v1 to v2 migrations that completed successfully.",
*REGISTRY
).unwrap();

pub static ref SQLITE_MIGRATION_FAILURES_TOTAL: IntCounterVec = register_int_counter_vec_with_registry!(
"pegboard_envoy_sqlite_migration_failures_total",
"Total number of sqlite v1 to v2 migration failures by phase.",
&["phase"],
*REGISTRY
).unwrap();

pub static ref SQLITE_MIGRATION_DURATION: Histogram = register_histogram_with_registry!(
"pegboard_envoy_sqlite_migration_duration_seconds",
"Duration of sqlite v1 to v2 migrations.",
BUCKETS.to_vec(),
*REGISTRY
).unwrap();

pub static ref SQLITE_MIGRATION_PAGES: Histogram = register_histogram_with_registry!(
"pegboard_envoy_sqlite_migration_pages",
"Number of pages imported during sqlite v1 to v2 migration.",
BUCKETS.to_vec(),
*REGISTRY
).unwrap();
}
Loading
Loading