From d3a8425d05396fb506ecdc17c085226e008cd0fc Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Tue, 26 Nov 2024 14:04:57 +0000 Subject: [PATCH] Update docs, add `--from=1c` benchmark 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. --- CHANGELOG.md | 4 ++++ benches/emerge.log | 14 ++++++++++++++ benches/exec_compare.rs | 2 ++ docs/COMPARISON.md | 20 ++++++++++---------- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cefe92..1d286ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/benches/emerge.log b/benches/emerge.log index c274288..6bf6d9f 100644 --- a/benches/emerge.log +++ b/benches/emerge.log @@ -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. diff --git a/benches/exec_compare.rs b/benches/exec_compare.rs index b453a21..3fb32d3 100755 --- a/benches/exec_compare.rs +++ b/benches/exec_compare.rs @@ -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), diff --git a/docs/COMPARISON.md b/docs/COMPARISON.md index d04fda1..628b3ce 100644 --- a/docs/COMPARISON.md +++ b/docs/COMPARISON.md @@ -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