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