Skip to content

Commit

Permalink
Update docs, add --from=1c benchmark
Browse files Browse the repository at this point in the history
Appended a non-sync emerge command to `benches/emerge.log` so that qlop finds something to
display. This is a nice illustration of how unreliable any "detect end of command" heuristics is.
It comforts me in the decision to not exactly match qlop's `--lastmerge` behavior (ignoring emerge
commands that didn't actually merge something): I value correctness over simplicity.
  • Loading branch information
vincentdephily committed Nov 26, 2024
1 parent 36a06b1 commit d3a8425
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## New features

* `log` and `stat` can now show emerge command start events
- Not end events, as `emerge.log` doesn't provide enough info to make this reliable
* `--from` and `--to` now accept a command index as argument
- `--from=1command` or `-fc` is roughly equivalent to qlop's `--lastmerge`
* `predict` now displays emerge proces tree instead of just top proces
- Bevahvior configurable with `--pdepth`, `--pwidth`
- Format is a bit nicer and more colorful
Expand Down
14 changes: 14 additions & 0 deletions benches/emerge.log
Original file line number Diff line number Diff line change
Expand Up @@ -100008,3 +100008,17 @@
1602189661: >>> Syncing repository 'moltonel' into '/var/db/repos/moltonel'...
1602189662: === Sync completed for moltonel
1602189663: *** terminating.
1602190319: Started emerge on: Mar 10, 2019 15:55:18
1602190319: *** emerge --newuse --update --backtrack=100 --deep --quiet-build=y --verbose world
1602190389: >>> emerge (1 of 1) www-client/chromium-72.0.3626.121 to /
1602190389: === (1 of 1) Cleaning (www-client/chromium-72.0.3626.121::/usr/portage/www-client/chromium/chromium-72.0.3626.121.ebuild)
1602190391: === (1 of 1) Compiling/Merging (www-client/chromium-72.0.3626.121::/usr/portage/www-client/chromium/chromium-72.0.3626.121.ebuild)
1602190620: === (1 of 1) Merging (www-client/chromium-72.0.3626.121::/usr/portage/www-client/chromium/chromium-72.0.3626.121.ebuild)
1602190624: >>> AUTOCLEAN: www-client/chromium:0
1602190624: === Unmerging... (www-client/chromium-72.0.3626.96)
1602190626: >>> unmerge success: www-client/chromium-72.0.3626.96
1602190635: === (1 of 1) Post-Build Cleaning (www-client/chromium-72.0.3626.121::/usr/portage/www-client/chromium/chromium-72.0.3626.121.ebuild)
1602190635: ::: completed emerge (1 of 1) www-client/chromium-72.0.3626.121 to /
1602190635: *** Finished. Cleaning up...
1602190636: *** exiting successfully.
1602190637: *** terminating.
2 changes: 2 additions & 0 deletions benches/exec_compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ fn main() {
("ld2", "genlop", &["-f","{emerge.log}","-l", "--date","2020-10-01","--date","2020-10-31"], None),
("ld2", "qlop", &["-f","{emerge.log}","-mv","--date","2020-10-01","--date","2020-10-31"], None),
("ld2", "emlop", &["-F","{emerge.log}","l", "--from","2020-10-01","--to", "2020-10-31"], None),
("ldl", "qlop", &["-f","{emerge.log}","-mv","--lastmerge"], None),
("ldl", "emlop", &["-F","{emerge.log}","l","--from=1c"], None),
// Force/prevent color output
("lc", "qlop", &["-f","{emerge.log}","-mv","--color"], None),
("lc", "emlop", &["-F","{emerge.log}","l","--color=y"], None),
Expand Down
20 changes: 10 additions & 10 deletions docs/COMPARISON.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ For relative dates, genlop accepts fancy strings like "last month" or "2 weeks a
less flexible but less verbose (no "ago" needed), and emlop only accepts a number of days/weeks/etc
which can be abbreviated (for example "1 week, 3 days" -> "1w3d").

| | genlop | qlop | emlop |
|:-----------------------------------------|:-----------:|:-----:|:-----------:|
| Limit log parsing by date | yes | yes | yes |
| Limit log to number fisrt/last n entries | no | no | yes |
| Limit log to last emerge operation | no | yes | no |
| Filter by package categ/name | yes | yes | yes |
| Filter by sync repo | no | no | yes |
| Read filter list from file | no | yes | no |
| Search modes | plain/regex | plain | plain/regex |
| Default search mode | plain | plain | regex |
| | genlop | qlop | emlop |
|:-----------------------------------------|:-----------:|:---------:|:-----------:|
| Limit log parsing by date | yes | yes | yes |
| Limit log to number fisrt/last n entries | no | no | yes |
| Limit log to nth emerge operation | no | last only | yes |
| Filter by package categ/name | yes | yes | yes |
| Filter by sync repo | no | no | yes |
| Read filter list from file | no | yes | no |
| Search modes | plain/regex | plain | plain/regex |
| Default search mode | plain | plain | regex |

## Merge time prediction

Expand Down

0 comments on commit d3a8425

Please sign in to comment.