Debian Codegraph @

Hledger/Cli/Commands/Stats.txt

raw
1 stats
2
3 Show journal and performance statistics.
4
5 Flags:
6 -1 show a single line of output
7 -v --verbose show more detailed output
8 -o --output-file=FILE write output to FILE.
9
10 The stats command shows summary information for the whole journal, or a
11 matched part of it. With a reporting interval, it shows a report for
12 each report period.
13
14 It also shows some performance statistics:
15
16 - how long the program ran for
17 - the number of transactions processed per second
18 - the peak live memory in use by the program to do its work
19 - the peak allocated memory as seen by the program
20
21 By default, the output is reasonably discreet; it reveals the main file
22 name, your activity level, and the speed of your machine.
23
24 With -v/--verbose, more details are shown: the full paths of all files,
25 and the names of the commodities you work with.
26
27 With -1, only one line of output is shown, in a machine-friendly
28 tab-separated format: the program version, the main journal file name,
29 and the performance stats,
30
31 The run time of stats is similar to that of a balance report.
32
33 Example:
34
35 $ hledger stats -f examples/1ktxns-1kaccts.journal
36 Main file : .../1ktxns-1kaccts.journal
37 Included files : 0
38 Txns span : 2000-01-01 to 2002-09-27 (1000 days)
39 Last txn : 2002-09-26 (7827 days ago)
40 Txns : 1000 (1.0 per day)
41 Txns last 30 days : 0 (0.0 per day)
42 Txns last 7 days : 0 (0.0 per day)
43 Payees/descriptions : 1000
44 Accounts : 1000 (depth 10)
45 Commodities : 26
46 Market prices : 1000
47 Runtime stats : 0.12 s elapsed, 8266 txns/s, 4 MB live, 16 MB alloc
48
49 $ hledger stats -1 -f examples/10ktxns-1kaccts.journal
50 1.50.99-g0835a2485-20251119, mac-aarch64 10ktxns-1kaccts.journal 0.66 s elapsed 15244 txns/s 28 MB live 86 MB alloc
51
52 This command supports the -o/--output-file option (but not
53 -O/--output-format).