From 32f04b46b4fff7338ad5c48af73dcd7d7fc918cb Mon Sep 17 00:00:00 2001 From: Brian Guarraci Date: Wed, 24 Jan 2024 18:00:05 -0700 Subject: [PATCH] clean up example --- examples/stats_logging/stats_server.kg | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/stats_logging/stats_server.kg b/examples/stats_logging/stats_server.kg index 3933c8d..8cfb3d9 100644 --- a/examples/stats_logging/stats_server.kg +++ b/examples/stats_logging/stats_server.kg @@ -29,17 +29,12 @@ statsT:::[:_(tbs?"stats");.table(colsFromNames(cols));tbs?"stats"] :" Create a database so we can inspect the data " db::.db(:{},"stats",,statsT) -:" Reading from the db will cause buffered inserts to flush into the underlying table " -syncDb::{db("select 1 from stats")} - :" Read and print the table size " tableSize::{[q];q::db("select count(*) from stats");.d("rows: ");.p(q);q} tableSize() :" Periodically report write stats " -lastTime::.pc() -lastSize::0 -batchSize::0 +lastTime::.pc();lastSize::0;batchSize::0 writeStats::{[n];n::.pc();.d("writes/sec: ");.p((batchSize-lastSize)%(n-lastTime));lastTime::n;lastSize::batchSize;1} .timer("write stats";60;writeStats)