Split last_upsert (persisted write) and last_refresh (run liveness) in stats
This commit is contained in:
@@ -96,6 +96,15 @@ def test_stats_no_error_by_default(source_engine, patched_cache):
|
||||
engine.close()
|
||||
|
||||
|
||||
def test_stats_exposes_last_upsert_and_last_refresh(source_engine, patched_cache):
|
||||
engine = CachingEngine(source_engine)
|
||||
engine.execute("SELECT id, name FROM products")
|
||||
s = engine.stats.tables["products"]
|
||||
assert s.last_upsert is not None # the load wrote rows (persisted)
|
||||
assert s.last_refresh is not None # the load also counts as a refresh-cycle run
|
||||
engine.close()
|
||||
|
||||
|
||||
# --- a table being loaded for the first time shows up as "loading" ----------
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user