Skip to content

Commit

Permalink
docs: update performance comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
howeyc committed Aug 27, 2023
1 parent d5ed2f2 commit d92eabe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions ledger/book/genperf.bash
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash

cbench --export-markdown perf-stats.md "ledger stats" "./ledger stats" "hledger stats"
cbench --export-markdown perf-bal.md "ledger bal" "./ledger bal" "hledger bal"
cbench --export-markdown perf-reg.md "ledger reg" "./ledger reg" "hledger reg"
cbench --export-markdown perf-print.md "ledger print" "./ledger print" "hledger print"
cbench --export-markdown perf-stats.md "ledger stats" "../ledger stats" "hledger stats"
cbench --export-markdown perf-bal.md "ledger bal" "../ledger bal" "hledger bal"
cbench --export-markdown perf-reg.md "ledger reg" "../ledger reg" "hledger reg"
cbench --export-markdown perf-print.md "ledger print" "../ledger print" "hledger print"

echo "# Performance" > perf.md
echo "" >> perf.md
Expand All @@ -16,23 +16,23 @@ echo "" >> perf.md

echo "## Stats" >> perf.md
echo "" >> perf.md
cat perf-stats.md | sed -e 's/\.\/ledger/ledger-go/g' | sed -e 's/ledger /ledger-cli /g' | sed -e 's/hledger-cli/hledger/g' >> perf.md
cat perf-stats.md | sed -e 's/\.\.\/ledger/ledger-go/g' | sed -e 's/ledger /ledger-cli /g' | sed -e 's/hledger-cli/hledger/g' >> perf.md
echo "" >> perf.md

echo "## Balance" >> perf.md
echo "" >> perf.md
cat perf-bal.md | sed -e 's/\.\/ledger/ledger-go/g' | sed -e 's/ledger /ledger-cli /g' | sed -e 's/hledger-cli/hledger/g' >> perf.md
cat perf-bal.md | sed -e 's/\.\.\/ledger/ledger-go/g' | sed -e 's/ledger /ledger-cli /g' | sed -e 's/hledger-cli/hledger/g' >> perf.md
echo "" >> perf.md

echo "## Register" >> perf.md
echo "" >> perf.md
cat perf-reg.md | sed -e 's/\.\/ledger/ledger-go/g' | sed -e 's/ledger /ledger-cli /g' | sed -e 's/hledger-cli/hledger/g' >> perf.md
cat perf-reg.md | sed -e 's/\.\.\/ledger/ledger-go/g' | sed -e 's/ledger /ledger-cli /g' | sed -e 's/hledger-cli/hledger/g' >> perf.md
echo "" >> perf.md

echo "## Print" >> perf.md
echo "" >> perf.md
cat perf-print.md | sed -e 's/\.\/ledger/ledger-go/g' | sed -e 's/ledger /ledger-cli /g' | sed -e 's/hledger-cli/hledger/g' >> perf.md
cat perf-print.md | sed -e 's/\.\.\/ledger/ledger-go/g' | sed -e 's/ledger /ledger-cli /g' | sed -e 's/hledger-cli/hledger/g' >> perf.md
echo "" >> perf.md

rm perf-stats.md perf-bal.md perf-reg.md perf-print.md
mv perf src/Performance.md
mv perf.md src/Performance.md
24 changes: 12 additions & 12 deletions ledger/book/src/Performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ Comparison between various ledger-like applications:

| Command | Mean | Min | Max | Relative |
|:---|---:|---:|---:|---:|
| `ledger-go stats` | 14.2ms ± 500µs | 13.1ms | 17.2ms | 1.00 |
| `ledger-cli stats` | 165.5ms ± 1.3ms | 163.3ms | 169.6ms | 11.58 ± 0.49 |
| `hledger stats` | 1.3275s ± 10.9ms | 1.3051s | 1.3458s | 92.90 ± 3.92 |
| `ledger-go stats` | 13.9ms ± 800µs | 11.9ms | 16.4ms | 1.00 |
| `ledger-cli stats` | 163ms ± 1.5ms | 161.1ms | 168.4ms | 11.65 ± 0.70 |
| `hledger stats` | 1.3441s ± 36.5ms | 1.3152s | 1.4253s | 96.06 ± 6.26 |

## Balance

| Command | Mean | Min | Max | Relative |
|:---|---:|---:|---:|---:|
| `ledger-go bal` | 23.9ms ± 700µs | 22.9ms | 28.1ms | 1.00 |
| `ledger-cli bal` | 139.5ms ± 1.3ms | 137.5ms | 144.3ms | 5.83 ± 0.18 |
| `hledger bal` | 1.333s ± 8.8ms | 1.3252s | 1.3559s | 55.66 ± 1.71 |
| `ledger-go bal` | 23.3ms ± 700µs | 21.2ms | 25.6ms | 1.00 |
| `ledger-cli bal` | 151.8ms ± 7.1ms | 139.8ms | 169.9ms | 6.50 ± 0.37 |
| `hledger bal` | 1.3373s ± 10.8ms | 1.315s | 1.3554s | 57.23 ± 1.98 |

## Register

| Command | Mean | Min | Max | Relative |
|:---|---:|---:|---:|---:|
| `ledger-go reg` | 52ms ± 1.1ms | 50.5ms | 57.7ms | 1.00 |
| `ledger-cli reg` | 1.7474s ± 20.8ms | 1.7138s | 1.7829s | 33.60 ± 0.84 |
| `hledger reg` | 1.9381s ± 8.8ms | 1.926s | 1.9564s | 37.26 ± 0.84 |
| `ledger-go reg` | 51.5ms ± 1.1ms | 49.2ms | 55.3ms | 1.00 |
| `ledger-cli reg` | 1.7532s ± 18.1ms | 1.723s | 1.7786s | 34.02 ± 0.85 |
| `hledger reg` | 1.9308s ± 14.3ms | 1.9056s | 1.9462s | 37.46 ± 0.90 |

## Print

| Command | Mean | Min | Max | Relative |
|:---|---:|---:|---:|---:|
| `ledger-go print` | 40.9ms ± 800µs | 39.2ms | 44.2ms | 1.00 |
| `ledger-cli print` | 239.1ms ± 2.8ms | 235.2ms | 246.5ms | 5.83 ± 0.14 |
| `hledger print` | 1.5487s ± 10ms | 1.5254s | 1.556s | 37.78 ± 0.83 |
| `ledger-go print` | 40.3ms ± 800µs | 38.4ms | 42.3ms | 1.00 |
| `ledger-cli print` | 238.6ms ± 3.2ms | 234.1ms | 246ms | 5.92 ± 0.15 |
| `hledger print` | 1.5484s ± 10.1ms | 1.525s | 1.5558s | 38.42 ± 0.87 |

0 comments on commit d92eabe

Please sign in to comment.