diff options
author | drh <> | 2025-05-03 10:49:39 +0000 |
---|---|---|
committer | drh <> | 2025-05-03 10:49:39 +0000 |
commit | e618674714d4ab4bbb9da3d440d3998d991ac595 (patch) | |
tree | 47d2baba3bfd48b80a08cd0207cd09b333c6efd1 /tool/sqlite3_rsync.c | |
parent | d7b83224bb86ccbbca340bb0c39b3366cd185bcd (diff) | |
download | sqlite-e618674714d4ab4bbb9da3d440d3998d991ac595.tar.gz sqlite-e618674714d4ab4bbb9da3d440d3998d991ac595.zip |
Addition summary results output when using -vvv on sqlite3_rsync.
FossilOrigin-Name: c702999cfac37fdcae64d261408e58d1f49fee65434fe346db6a2a6c7f8ac54e
Diffstat (limited to 'tool/sqlite3_rsync.c')
-rw-r--r-- | tool/sqlite3_rsync.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tool/sqlite3_rsync.c b/tool/sqlite3_rsync.c index 6607e1fb0..0a3228247 100644 --- a/tool/sqlite3_rsync.c +++ b/tool/sqlite3_rsync.c @@ -40,6 +40,7 @@ static const char zUsage[] = ; typedef unsigned char u8; +typedef sqlite3_uint64 u64; /* Context for the run */ typedef struct SQLiteRsync SQLiteRsync; @@ -66,7 +67,8 @@ struct SQLiteRsync { sqlite3_uint64 nIn; /* Bytes received */ unsigned int nPage; /* Total number of pages in the database */ unsigned int szPage; /* Database page size */ - unsigned int nHashSent; /* Hashes sent (replica to origin) */ + u64 nHashSent; /* Hashes sent (replica to origin) */ + unsigned int nRound; /* Number of hash batches (replica to origin) */ unsigned int nPageSent; /* Page contents sent (origin to replica) */ }; @@ -1466,6 +1468,7 @@ static void originSide(SQLiteRsync *p){ if( p->zDebugFile ){ debugMessage(p, "<- REPLICA_READY\n"); } + p->nRound++; pStmt = prepareStmt(p,"SELECT pgno, sz FROM badHash WHERE sz>1"); if( pStmt==0 ) break; while( sqlite3_step(pStmt)==SQLITE_ROW ){ @@ -1603,6 +1606,7 @@ static void sendHashMessages( runSql(p, "DELETE FROM sendHash"); writeByte(p, REPLICA_READY); fflush(p->pOut); + p->nRound++; if( p->zDebugFile ) debugMessage(p, "-> REPLICA_READY\n", iHash); } @@ -2299,6 +2303,11 @@ int main(int argc, char const * const *argv){ printf("%s\n", zMsg); sqlite3_free(zMsg); } + if( ctx.eVerbose>=3 ){ + printf("hashes: %lld hash-rounds: %d" + " page updates: %d protocol: %d\n", + ctx.nHashSent, ctx.nRound, ctx.nPageSent, ctx.iProtocol); + } } sqlite3_free(zCmd); if( pIn!=0 && pOut!=0 ){ |