hledger/tests/journal
Simon Michael c23fc8b671 speed up -V/--value by converting reports, not the journal (#999)
Instead of converting all journal amounts to value early on, we now
convert just the report amounts to value, before rendering.

This was basically how it originally worked (for the balance command),
but now it's built in to the four basic reports used by print,
register, balance and their variants - Entries, Postings, Balance,
MultiBalance - each of which now has its own xxValue helper.

This should mostly fix -V's performance when there are many
transactions and prices (the price lookups could still be optimised),
and allow more flexibility for report-specific value calculations.

+------------------------------------------++-----------------+-------------------+--------------------------+
|                                          || hledger.999.pre | hledger.999.1sort | hledger.999.after-report |
+==========================================++=================+===================+==========================+
| -f examples/1000x1000x10.journal bal -V  ||            1.08 |              0.96 |                     0.76 |
| -f examples/2000x1000x10.journal bal -V  ||            1.65 |              1.05 |                     0.73 |
| -f examples/3000x1000x10.journal bal -V  ||            2.43 |              1.58 |                     0.84 |
| -f examples/4000x1000x10.journal bal -V  ||            4.39 |              1.96 |                     0.93 |
| -f examples/5000x1000x10.journal bal -V  ||            7.75 |              2.99 |                     1.07 |
| -f examples/6000x1000x10.journal bal -V  ||           11.21 |              3.72 |                     1.16 |
| -f examples/7000x1000x10.journal bal -V  ||           16.91 |              4.72 |                     1.19 |
| -f examples/8000x1000x10.journal bal -V  ||           27.10 |              9.83 |                     1.40 |
| -f examples/9000x1000x10.journal bal -V  ||           39.73 |             15.00 |                     1.51 |
| -f examples/10000x1000x10.journal bal -V ||           50.72 |             25.61 |                     2.15 |
+------------------------------------------++-----------------+-------------------+--------------------------+

There's one new limitation, not yet resolved: -V once again can pick a
valuation date in the future, if no report end date is specified and
the journal has future-dated transactions. We prefer to avoid that,
but reports currently are pure and don't have access to today's date.
2019-04-23 17:39:01 -07:00
..
a.timeclock func. test for 320 2016-05-18 13:10:41 -07:00
amounts-and-commodities.test lib: "decimal point" -> "decimal separator" in error message 2018-08-17 07:37:26 +01:00
auto-postings.test lib: more transaction balancing/assertions/assignments cleanup 2019-02-20 09:14:30 -08:00
b.timedot func. test for 320 2016-05-18 13:10:41 -07:00
balance-assertions.test lib: more transaction balancing/assertions/assignments cleanup 2019-02-20 09:14:30 -08:00
blank-description.test tests: make functional tests use "hledger" again 2015-07-12 12:29:53 -07:00
comments.test journal: clarify that txn/posting comments must start with semicolon 2017-11-01 08:04:25 -07:00
dates.test lib: refactor date parser 2018-05-24 09:35:27 -07:00
default-commodity.test lib: D should not affect automated posting multiplier amounts (fix #860) 2018-08-17 07:39:17 +01:00
directives-account.test tests: clean up directives test files 2018-10-10 20:31:08 -07:00
directives.test tests: clean up directives test files 2018-10-10 20:31:08 -07:00
include.test make the #949 functional test more robust 2019-01-16 09:19:56 -08:00
market-prices.test speed up -V/--value by converting reports, not the journal (#999) 2019-04-23 17:39:01 -07:00
numbers.test lib: "decimal point" -> "decimal separator" in error message 2018-08-17 07:37:26 +01:00
parens-in-account-name.test lib: keep amounts aligned when rendering a transaction with posting flags 2017-06-04 21:26:18 -07:00
parse-errors.test tests: note parse-errors.test fragility 2019-04-20 09:25:09 -07:00
parse-sample-journal.test tests: make functional tests use "hledger" again 2015-07-12 12:29:53 -07:00
posting-dates.test lib: refine date parser error messages 2018-06-11 13:58:55 -06:00
precision.test journal: infer and balance amounts with standard amount styles (fix #737) 2018-04-20 13:40:05 -07:00
scientific.test scientific notation test notes (#704, #706) 2018-03-31 02:42:37 +01:00
status.journal lib, cli: -U/--uncleared no longer matches pending things (#564) 2017-06-15 19:16:39 -07:00
status.test rename "uncleared" status to "unmarked" and --uncleared to --unmarked (#564) 2017-06-15 19:16:39 -07:00
tags.test lib: keep amounts aligned when rendering a transaction with posting flags 2017-06-04 21:26:18 -07:00
transaction-prices.test lib: keep amounts aligned when rendering a transaction with posting flags 2017-06-04 21:26:18 -07:00
unbalanced.test tests: make functional tests use "hledger" again 2015-07-12 12:29:53 -07:00
virtual-postings.test Balance Assignments and accounts resetting (#438) 2016-12-10 07:04:48 -08:00