Browse Source

ckdb - itemise the sync values in 'homepage'

master
kanoi 9 years ago
parent
commit
511d8b73a4
  1. 2
      src/ckdb.h
  2. 11
      src/ckdb_cmd.c

2
src/ckdb.h

@ -55,7 +55,7 @@
#define DB_VLOCK "1" #define DB_VLOCK "1"
#define DB_VERSION "1.0.4" #define DB_VERSION "1.0.4"
#define CKDB_VERSION DB_VERSION"-1.700" #define CKDB_VERSION DB_VERSION"-1.701"
#define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__ #define WHERE_FFL_HERE __FILE__, __func__, __LINE__

11
src/ckdb_cmd.c

@ -3304,10 +3304,13 @@ static char *cmd_homepage(__maybe_unused PGconn *conn, char *cmd, char *id,
} }
// Don't bother with locking - it's just an FYI web stat // Don't bother with locking - it's just an FYI web stat
int sync = pool_workqueue_store->count; int psync = pool_workqueue_store->count;
sync += cmd_workqueue_store->count; int csync = cmd_workqueue_store->count;
sync += btc_workqueue_store->count; int bsync = btc_workqueue_store->count;
snprintf(tmp, sizeof(tmp), "sync=%d%c", sync, FLDSEP); snprintf(tmp, sizeof(tmp), "psync=%d%c", psync, FLDSEP);
snprintf(tmp, sizeof(tmp), "csync=%d%c", csync, FLDSEP);
snprintf(tmp, sizeof(tmp), "bsync=%d%c", bsync, FLDSEP);
snprintf(tmp, sizeof(tmp), "sync=%d%c", psync + csync + bsync, FLDSEP);
APPEND_REALLOC(buf, off, len, tmp); APPEND_REALLOC(buf, off, len, tmp);
u_item = NULL; u_item = NULL;

Loading…
Cancel
Save