Fossil

Check-in [6bb63a73]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the query on the /stat page that computes the number of check-ins. The old query omitted checkins (such as merges or null-checkins or branch creations) that did not add any new artifacts to the repository. Also remove the "server id" from the /stat report since that information is no longer used for anything.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6bb63a736493d0dbb718a33707cad210d052f53b
User & Date: drh 2013-01-18 00:55:12
References
2013-01-18
11:06
Changed days-per-year from 365.24 to 365.2425, which is (per Wikipedia) more correct over longer time periods (patch from J. van den Hoff). Removed serverId from /json/stat output, analog to commit [6bb63a7364]. check-in: 823d3ed6 user: stephan tags: trunk
Context
2013-01-18
02:11
Avoid unnecessary escaping of : characters in URLs in order to make the links more readable. check-in: afec3f81 user: drh tags: trunk
00:55
Fix the query on the /stat page that computes the number of check-ins. The old query omitted checkins (such as merges or null-checkins or branch creations) that did not add any new artifacts to the repository. Also remove the "server id" from the /stat report since that information is no longer used for anything. check-in: 6bb63a73 user: drh tags: trunk
00:47
Consolidate all sqlite3_open() calls into the db_open() routine and initialize every database connection the same way. Avoid using sqlite3_exec() in order to obtain a more accurate count of perpared statements when --sqltrace is used. check-in: f97e1cf6 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/stat.c.

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
        b = 1;
      }
      a = t/fsize;
      @ %d(a):%d(b)
      @ </td></tr>
    }
    @ <tr><th>Number&nbsp;Of&nbsp;Check-ins:</th><td>
    n = db_int(0, "SELECT count(distinct mid) FROM mlink /*scan*/");
    @ %d(n)
    @ </td></tr>
    @ <tr><th>Number&nbsp;Of&nbsp;Files:</th><td>
    n = db_int(0, "SELECT count(*) FROM filename /*scan*/");
    @ %d(n)
    @ </td></tr>
    @ <tr><th>Number&nbsp;Of&nbsp;Wiki&nbsp;Pages:</th><td>
................................................................................
  }
  @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
  n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
                " + 0.99");
  @ %d(n) days or approximately %.2f(n/365.24) years.
  @ </td></tr>
  @ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
  @ <tr><th>Server&nbsp;ID:</th><td>%h(db_get("server-code",""))</td></tr>
  @ <tr><th>Fossil&nbsp;Version:</th><td>
  @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
  @ (%h(COMPILER_NAME))
  @ </td></tr>
  @ <tr><th>SQLite&nbsp;Version:</th><td>%.19s(SQLITE_SOURCE_ID)
  @ [%.10s(&SQLITE_SOURCE_ID[20])] (%s(SQLITE_VERSION))</td></tr>
  @ <tr><th>Database&nbsp;Stats:</th><td>







|







 







<







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
116
117
118
119
120
121
122

123
124
125
126
127
128
129
        b = 1;
      }
      a = t/fsize;
      @ %d(a):%d(b)
      @ </td></tr>
    }
    @ <tr><th>Number&nbsp;Of&nbsp;Check-ins:</th><td>
    n = db_int(0, "SELECT count(*) FROM event WHERE type='ci' /*scan*/");
    @ %d(n)
    @ </td></tr>
    @ <tr><th>Number&nbsp;Of&nbsp;Files:</th><td>
    n = db_int(0, "SELECT count(*) FROM filename /*scan*/");
    @ %d(n)
    @ </td></tr>
    @ <tr><th>Number&nbsp;Of&nbsp;Wiki&nbsp;Pages:</th><td>
................................................................................
  }
  @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
  n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
                " + 0.99");
  @ %d(n) days or approximately %.2f(n/365.24) years.
  @ </td></tr>
  @ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>

  @ <tr><th>Fossil&nbsp;Version:</th><td>
  @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
  @ (%h(COMPILER_NAME))
  @ </td></tr>
  @ <tr><th>SQLite&nbsp;Version:</th><td>%.19s(SQLITE_SOURCE_ID)
  @ [%.10s(&SQLITE_SOURCE_ID[20])] (%s(SQLITE_VERSION))</td></tr>
  @ <tr><th>Database&nbsp;Stats:</th><td>