Fossil SCM
| 85967b7… | stephan | 1 | # JSON API: /stat |
| 85967b7… | stephan | 2 | ([⬑JSON API Index](index.md)) |
| 85967b7… | stephan | 3 | |
| 85967b7… | stephan | 4 | # Repository Stats |
| 85967b7… | stephan | 5 | |
| 85967b7… | stephan | 6 | **Status:** implemented |
| 85967b7… | stephan | 7 | |
| 85967b7… | stephan | 8 | **Required privileges:** "o" |
| 85967b7… | stephan | 9 | |
| 85967b7… | stephan | 10 | **Request:** `/json/stat` |
| 85967b7… | stephan | 11 | |
| 85967b7… | stephan | 12 | **Response payload example:** (fields marked with `*` are omitted in |
| 85967b7… | stephan | 13 | "brief" mode) |
| 85967b7… | stephan | 14 | |
| 85967b7… | stephan | 15 | ```json |
| 85967b7… | stephan | 16 | { |
| 85967b7… | stephan | 17 | "projectName":"Fossil", |
| 85967b7… | stephan | 18 | "projectDescription":"Fossil SCM", /* added 20120217 */ |
| 85967b7… | stephan | 19 | "repositorySize":24464384, |
| 85967b7… | stephan | 20 | * "blobCount":13612, |
| 85967b7… | stephan | 21 | * "deltaCount":9348, |
| 85967b7… | stephan | 22 | * "uncompressedArtifactSize":589205834, |
| 85967b7… | stephan | 23 | * "averageArtifactSize":43292, |
| 85967b7… | stephan | 24 | * "maxArtifactSize":4620758, |
| 85967b7… | stephan | 25 | * "compressionRatio":"24:1", |
| 85967b7… | stephan | 26 | * "checkinCount":3150, |
| 85967b7… | stephan | 27 | * "fileCount":456, |
| 85967b7… | stephan | 28 | * "wikiPageCount":23, |
| 85967b7… | stephan | 29 | * "ticketCount":940, |
| 85967b7… | stephan | 30 | "ageDays":1512, |
| 85967b7… | stephan | 31 | "ageYears":4.139744, |
| 85967b7… | stephan | 32 | "projectCode":"25d3a4b83202c0d616a5ed17334f180dac4434dc", |
| 85967b7… | stephan | 33 | "compiler":"gcc-4.1.2 20080704 (Red Hat 4.1.2-50)", |
| 85967b7… | stephan | 34 | "sqlite":{ |
| 85967b7… | stephan | 35 | "version":"2011-09-04 01:27:00 [6b657ae750] (3.7.8)", |
| 85967b7… | stephan | 36 | "pageCount":23891, |
| 85967b7… | stephan | 37 | "pageSize":1024, |
| 85967b7… | stephan | 38 | "freeList":2705, |
| 85967b7… | stephan | 39 | "encoding":"UTF-8", |
| 85967b7… | stephan | 40 | "journalMode":"delete" |
| 85967b7… | stephan | 41 | } |
| 85967b7… | stephan | 42 | } |
| 85967b7… | stephan | 43 | ``` |
| 85967b7… | stephan | 44 | |
| 85967b7… | stephan | 45 | **Options:** |
| 85967b7… | stephan | 46 | |
| 85967b7… | stephan | 47 | - "Full detail" mode:\ |
| 85967b7… | stephan | 48 | **HTTP/payload parameter:** full=bool\ |
| 85967b7… | stephan | 49 | **CLI MODE:** -f|--full with no value.\ |
| 85967b7… | stephan | 50 | If true then all properties are included, else certain properties |
| 85967b7… | stephan | 51 | are omitted from the payload (because they take a relatively long |
| 85967b7… | stephan | 52 | time to calculate).\ |
| 85967b7… | stephan | 53 | **TODO:** rename this to verbose, for consistency.\ |
| 85967b7… | stephan | 54 | **Default=false**. *This is in contrast to the HTML interface*, |
| 85967b7… | stephan | 55 | which defaults to full detail mode. Testing shows stat to have a |
| 85967b7… | stephan | 56 | relatively high per-call cost/run time, so it defaults |
| 85967b7… | stephan | 57 | to "brief" mode by default. Full-detail mode can, on slow hardware, |
| 85967b7… | stephan | 58 | take half a minute to respond, whereas non-full mode takes well |
| 85967b7… | stephan | 59 | under one second. |