feat: schema cache metrics
This commit is contained in:
committed by
Steve Chavez
parent
653c7955b2
commit
357400b2b8
@@ -1435,6 +1435,8 @@ def test_admin_metrics(defaultenv):
|
||||
with run(env=defaultenv, port=freeport()) as postgrest:
|
||||
response = postgrest.admin.get("/metrics")
|
||||
assert response.status_code == 200
|
||||
assert "pgrst_schema_cache_query_time_seconds" in response.text
|
||||
assert "pgrst_schema_cache_loads_total" in response.text
|
||||
assert "pgrst_db_pool_max" in response.text
|
||||
assert "pgrst_db_pool_waiting" in response.text
|
||||
assert "pgrst_db_pool_available" in response.text
|
||||
|
||||
@@ -280,4 +280,3 @@ main = do
|
||||
where
|
||||
loadSCache pool conf =
|
||||
either (panic.show) id <$> P.use pool (HT.transaction HT.ReadCommitted HT.Read $ querySchemaCache conf)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user