Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | When doing a verbose sync/pull/push, also print total uncompressed bytes sent/received, to match displayed statistics for each round trip. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
9abbd35b8e77f1b1b7d32a6a969398f4 |
| User & Date: | danield 2021-07-13 15:21:45.616 |
Context
|
2021-07-14
| ||
| 12:52 | Add the --no-http-compression option to "fossil sync" and similar. Extra explanation of compressed and uncompressed values in the response output from the sync. check-in: 2b8ac4d15b user: drh tags: trunk | |
|
2021-07-13
| ||
| 15:21 | When doing a verbose sync/pull/push, also print total uncompressed bytes sent/received, to match displayed statistics for each round trip. check-in: 9abbd35b8e user: danield tags: trunk | |
|
2021-07-12
| ||
| 18:37 | Back out the m2= query parameter for /timeline. Instead go back in and document the sel1= and sel2= query parameters. Note the subtle differences between m= and sel1=. Do not allow m=, or c=, or any other parameter to override sel1=. check-in: ee07556688 user: drh tags: trunk | |
Changes
Changes to src/xfer.c.
| ︙ | ︙ | |||
1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 | int nCardRcvd = 0; /* Number of cards received */ int nCycle = 0; /* Number of round trips to the server */ int size; /* Size of a config value or uvfile */ int origConfigRcvMask; /* Original value of configRcvMask */ int nFileRecv; /* Number of files received */ int mxPhantomReq = 200; /* Max number of phantoms to request per comm */ const char *zCookie; /* Server cookie */ i64 nSent, nRcvd; /* Bytes sent and received (after compression) */ int cloneSeqno = 1; /* Sequence number for clones */ Blob send; /* Text we are sending to the server */ Blob recv; /* Reply we got back from the server */ Xfer xfer; /* Transfer data */ int pctDone; /* Percentage done with a message */ int lastPctDone = -1; /* Last displayed pctDone */ | > | 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 | int nCardRcvd = 0; /* Number of cards received */ int nCycle = 0; /* Number of round trips to the server */ int size; /* Size of a config value or uvfile */ int origConfigRcvMask; /* Original value of configRcvMask */ int nFileRecv; /* Number of files received */ int mxPhantomReq = 200; /* Max number of phantoms to request per comm */ const char *zCookie; /* Server cookie */ i64 nUncSent, nUncRcvd; /* Bytes sent and received (before compression) */ i64 nSent, nRcvd; /* Bytes sent and received (after compression) */ int cloneSeqno = 1; /* Sequence number for clones */ Blob send; /* Text we are sending to the server */ Blob recv; /* Reply we got back from the server */ Xfer xfer; /* Transfer data */ int pctDone; /* Percentage done with a message */ int lastPctDone = -1; /* Last displayed pctDone */ |
| ︙ | ︙ | |||
1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 |
blobarray_zero(xfer.aToken, count(xfer.aToken));
blob_zero(&send);
blob_zero(&recv);
blob_zero(&xfer.err);
blob_zero(&xfer.line);
origConfigRcvMask = 0;
/* Send the send-private pragma if we are trying to sync private data */
if( syncFlags & SYNC_PRIVATE ){
blob_append(&send, "pragma send-private\n", -1);
}
/* Figure out which check-in to lock */
| > | 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 |
blobarray_zero(xfer.aToken, count(xfer.aToken));
blob_zero(&send);
blob_zero(&recv);
blob_zero(&xfer.err);
blob_zero(&xfer.line);
origConfigRcvMask = 0;
nUncSent = nUncRcvd = 0;
/* Send the send-private pragma if we are trying to sync private data */
if( syncFlags & SYNC_PRIVATE ){
blob_append(&send, "pragma send-private\n", -1);
}
/* Figure out which check-in to lock */
|
| ︙ | ︙ | |||
2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 |
xfer.nFileSent = 0;
xfer.nDeltaSent = 0;
xfer.nGimmeSent = 0;
xfer.nIGotSent = 0;
xfer.nPrivIGot = 0;
lastPctDone = -1;
blob_reset(&send);
blob_appendf(&send, "pragma client-version %d %d %d\n",
RELEASE_VERSION_NUMBER, MANIFEST_NUMERIC_DATE,
MANIFEST_NUMERIC_TIME);
rArrivalTime = db_double(0.0, "SELECT julianday('now')");
/* Send the send-private pragma if we are trying to sync private data */
| > | 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 |
xfer.nFileSent = 0;
xfer.nDeltaSent = 0;
xfer.nGimmeSent = 0;
xfer.nIGotSent = 0;
xfer.nPrivIGot = 0;
lastPctDone = -1;
nUncSent += blob_size(&send);
blob_reset(&send);
blob_appendf(&send, "pragma client-version %d %d %d\n",
RELEASE_VERSION_NUMBER, MANIFEST_NUMERIC_DATE,
MANIFEST_NUMERIC_TIME);
rArrivalTime = db_double(0.0, "SELECT julianday('now')");
/* Send the send-private pragma if we are trying to sync private data */
|
| ︙ | ︙ | |||
2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 |
fossil_print(zValueFormat /*works-like:"%s%d%d%d%d"*/, "Received:",
blob_size(&recv), nCardRcvd,
xfer.nFileRcvd, xfer.nDeltaRcvd + xfer.nDanglingFile);
}else{
fossil_print(zBriefFormat /*works-like:"%d%d%d"*/,
nRoundtrip, nArtifactSent, nArtifactRcvd);
}
blob_reset(&recv);
nCycle++;
/* If we received one or more files on the previous exchange but
** there are still phantoms, then go another round.
*/
nFileRecv = xfer.nFileRcvd + xfer.nDeltaRcvd + xfer.nDanglingFile;
| > | 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 |
fossil_print(zValueFormat /*works-like:"%s%d%d%d%d"*/, "Received:",
blob_size(&recv), nCardRcvd,
xfer.nFileRcvd, xfer.nDeltaRcvd + xfer.nDanglingFile);
}else{
fossil_print(zBriefFormat /*works-like:"%d%d%d"*/,
nRoundtrip, nArtifactSent, nArtifactRcvd);
}
nUncRcvd += blob_size(&recv);
blob_reset(&recv);
nCycle++;
/* If we received one or more files on the previous exchange but
** there are still phantoms, then go another round.
*/
nFileRecv = xfer.nFileRcvd + xfer.nDeltaRcvd + xfer.nDanglingFile;
|
| ︙ | ︙ | |||
2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 |
g.clockSkewSeen = 1;
}
fossil_force_newline();
fossil_print(
"%s done, sent: %lld received: %lld ip: %s\n",
zOpType, nSent, nRcvd, g.zIpAddr);
transport_close(&g.url);
transport_global_shutdown(&g.url);
if( nErr && go==2 ){
db_multi_exec("DROP TABLE onremote; DROP TABLE unk;");
manifest_crosslink_end(MC_PERMIT_HOOKS);
content_enable_dephantomize(1);
db_end_transaction(0);
| > > > > | 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 |
g.clockSkewSeen = 1;
}
fossil_force_newline();
fossil_print(
"%s done, sent: %lld received: %lld ip: %s\n",
zOpType, nSent, nRcvd, g.zIpAddr);
if( syncFlags & SYNC_VERBOSE ){
fossil_print(
"Uncompressed sent: %lld received: %lld\n", nUncSent, nUncRcvd);
}
transport_close(&g.url);
transport_global_shutdown(&g.url);
if( nErr && go==2 ){
db_multi_exec("DROP TABLE onremote; DROP TABLE unk;");
manifest_crosslink_end(MC_PERMIT_HOOKS);
content_enable_dephantomize(1);
db_end_transaction(0);
|
| ︙ | ︙ |