Differences From:
File
src/stat.c
part of check-in
[1cde715739]
- Added trailing newline to file b/c gcc complains about it
by
stephan on
2008-02-26 15:07:19.
Also file
src/stat.c
part of check-in
[2e84fb3e54]
- Merged with 82fc5abb60.
by
aku on
2008-02-27 04:15:47.
[view]
To:
File
src/stat.c
part of check-in
[80dc46d635]
- Fix problems on the stat page that appear for larger repositories.
by
drh on
2008-03-06 00:26:55.
[view]
@@ -33,9 +33,11 @@
**
** Show statistics and global information about the repository.
*/
void stat_page(void){
- int n, m, k;
+ i64 t;
+ int n, m;
+ char zBuf[100];
login_check_credentials();
if( !g.okRead ){ login_needed(); return; }
style_header("Repository Statistics");
@ <p><table class="label-value">
@@ -49,10 +51,11 @@
@ %d(n-m) complete, %d(m) deltas, %d(n) total
@ </td></tr>
if( n>0 ){
@ <tr><th>Uncompressed Artifact Size:</th><td>
- k = db_int(0, "SELECT total(size) FROM blob WHERE size>0");
- @ %d((int)(((double)k)/(double)n)) bytes average, %d(k) bytes total
+ t = db_int64(0, "SELECT total(size) FROM blob WHERE size>0");
+ sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", t);
+ @ %d((int)(((double)t)/(double)n)) bytes average, %s(zBuf) bytes total
@ </td></tr>
}
@ <tr><th>Number Of Baselines:</th><td>
n = db_int(0, "SELECT count(distinct mid) FROM mlink");