barcat.git
16 months agoversion 1.10 marking stable log support master v1.10
Mischa POSLAWSKY [Mon, 12 Dec 2022 19:30:27 +0000 (20:30 +0100)]
version 1.10 marking stable log support

16 months agoreport generic calc percentiles instead of min/max
Mischa POSLAWSKY [Sat, 10 Dec 2022 00:19:21 +0000 (01:19 +0100)]
report generic calc percentiles instead of min/max

16 months agoinvert percentile numbers to expected order
Mischa POSLAWSKY [Sat, 10 Dec 2022 00:27:23 +0000 (01:27 +0100)]
invert percentile numbers to expected order

16 months agosum calculation on demand and cached
Mischa POSLAWSKY [Sat, 10 Dec 2022 00:12:57 +0000 (01:12 +0100)]
sum calculation on demand and cached

Automatic handling of any (re)use in calc().

16 months agot/regress: debug output on error status
Mischa POSLAWSKY [Fri, 9 Dec 2022 20:27:48 +0000 (21:27 +0100)]
t/regress: debug output on error status

16 months agoignore zero values in report conditions
Mischa POSLAWSKY [Fri, 9 Dec 2022 20:23:26 +0000 (21:23 +0100)]
ignore zero values in report conditions

Fix empty stats again, with tests for probable future breakage.

16 months agoweighted percentile interpolation
Mischa POSLAWSKY [Wed, 7 Dec 2022 21:55:54 +0000 (22:55 +0100)]
weighted percentile interpolation

Proper interpolation of values not on exact halves.

16 months agomarker functions in report variables
Mischa POSLAWSKY [Wed, 7 Dec 2022 21:14:13 +0000 (22:14 +0100)]
marker functions in report variables

Fall back to the same syntax provided by common calc() parser.

16 months agomarker positions rounded like bar lengths
Mischa POSLAWSKY [Wed, 7 Dec 2022 21:18:33 +0000 (22:18 +0100)]
marker positions rounded like bar lengths

Fix outstanding irregularities in bars extending beyond marked values.

16 months agoincrement minimum marker position
Mischa POSLAWSKY [Wed, 7 Dec 2022 20:17:28 +0000 (21:17 +0100)]
increment minimum marker position

First value corresponds to before the leftmost character.
Transpose to make it visible if significant (i.e. not expected 0).

16 months agodelete little joke from pod description
Mischa POSLAWSKY [Sun, 4 Dec 2022 23:23:52 +0000 (00:23 +0100)]
delete little joke from pod description

Too much funny.  The next one is arguably just bad grammar so can stay.

16 months agounspecified field counts entire lines
Mischa POSLAWSKY [Sun, 4 Dec 2022 05:25:01 +0000 (06:25 +0100)]
unspecified field counts entire lines

Expected behaviour equivalent to sort|uniq.

16 months agosupport count combined with trim, interval
Mischa POSLAWSKY [Sat, 3 Dec 2022 01:32:56 +0000 (02:32 +0100)]
support count combined with trim, interval

16 months agocount duplicates anchored by specified field
Mischa POSLAWSKY [Fri, 2 Dec 2022 22:15:08 +0000 (23:15 +0100)]
count duplicates anchored by specified field

16 months agocount option providing improved uniq -c
Mischa POSLAWSKY [Fri, 2 Dec 2022 20:41:32 +0000 (21:41 +0100)]
count option providing improved uniq -c

16 months agot/regress: indicate todo in command specification
Mischa POSLAWSKY [Sun, 4 Dec 2022 22:52:23 +0000 (23:52 +0100)]
t/regress: indicate todo in command specification

16 months agot: different input options besides parameters
Mischa POSLAWSKY [Wed, 30 Nov 2022 14:07:21 +0000 (15:07 +0100)]
t: different input options besides parameters

16 months agodocument available palette parameter names
Mischa POSLAWSKY [Tue, 29 Nov 2022 03:01:37 +0000 (04:01 +0100)]
document available palette parameter names

Public specification, with former uk grey spelling replaced by us gray
(consistent with "color").

16 months agobold option item titles in pod
Mischa POSLAWSKY [Tue, 29 Nov 2022 02:41:03 +0000 (03:41 +0100)]
bold option item titles in pod

Follow recommended man page formatting as described by groff_man_style(7),
in particular bold for command-line options and literal input, italics for
variables and constants, instead of syntax resembling git documentation
but without the semantics from asciidoc.

16 months agodocument statistics signaling
Mischa POSLAWSKY [Sun, 27 Nov 2022 23:29:35 +0000 (00:29 +0100)]
document statistics signaling

Nice to know without reading source code or somehow guessing similarity to
ping.

16 months agoline stats regardless of values, nested report templates
Mischa POSLAWSKY [Mon, 28 Nov 2022 22:54:33 +0000 (23:54 +0100)]
line stats regardless of values, nested report templates

Additional colon operator just to make optional parts more legible.

16 months agocomplete report template with optional variables
Mischa POSLAWSKY [Mon, 28 Nov 2022 15:48:58 +0000 (16:48 +0100)]
complete report template with optional variables

Hide undefined names instead of warning, so the entire stat line can be
configured.

16 months agoreuse hide limits calculation in stats
Mischa POSLAWSKY [Sun, 27 Nov 2022 17:20:23 +0000 (18:20 +0100)]
reuse hide limits calculation in stats

Fix incorrect counts and duplicate code.

16 months agoending line count in limit range (prefix +)
Mischa POSLAWSKY [Sat, 26 Nov 2022 13:09:49 +0000 (14:09 +0100)]
ending line count in limit range (prefix +)

Similar to git log.

16 months agoapply hide limits in length calculation
Mischa POSLAWSKY [Sat, 26 Nov 2022 13:21:36 +0000 (14:21 +0100)]
apply hide limits in length calculation

16 months agot/regress: integrate cmddiff in line
Mischa POSLAWSKY [Sun, 27 Nov 2022 18:33:35 +0000 (19:33 +0100)]
t/regress: integrate cmddiff in line

Restore to near shell speed, and control diagnostics output.

16 months agot/regress: perl conversion of file loop
Mischa POSLAWSKY [Tue, 22 Nov 2022 00:29:18 +0000 (01:29 +0100)]
t/regress: perl conversion of file loop

Outstanding cleanup of some extended shell scripting, easier to maintain as
equivalent perl (especially considering comparison rewritten as cmddiff
could be integrated to undo slowdown due to interpreter overhead).

16 months agot: rename output files without command parameters
Mischa POSLAWSKY [Thu, 24 Nov 2022 21:51:26 +0000 (22:51 +0100)]
t: rename output files without command parameters

Contained within.

16 months agot: move input files separate from output numbers
Mischa POSLAWSKY [Thu, 24 Nov 2022 21:37:12 +0000 (22:37 +0100)]
t: move input files separate from output numbers

Unconstrained by test suite matching; free to rename to their identifying
properties, without symlinks on reuse.

16 months agot/regress: prepend commands to output files, cmddiff to compare
Mischa POSLAWSKY [Thu, 24 Nov 2022 20:44:24 +0000 (21:44 +0100)]
t/regress: prepend commands to output files, cmddiff to compare

Input file names no longer necessarily identical, nor do parameters' special
characters have to be included (renames in separate commit).

16 months agot/regress: color sequences in dash
Mischa POSLAWSKY [Wed, 23 Nov 2022 19:39:35 +0000 (20:39 +0100)]
t/regress: color sequences in dash

Shorthand for escape is a bashism apparently.

16 months agot/examples: skip all if missing dependency
Mischa POSLAWSKY [Wed, 23 Nov 2022 19:38:47 +0000 (20:38 +0100)]
t/examples: skip all if missing dependency

Not a core module.

16 months agot/pod: validate documentation syntax
Mischa POSLAWSKY [Tue, 22 Nov 2022 00:58:15 +0000 (01:58 +0100)]
t/pod: validate documentation syntax

16 months agologarithmic repeat markers multiply by 10
Mischa POSLAWSKY [Mon, 21 Nov 2022 19:40:41 +0000 (20:40 +0100)]
logarithmic repeat markers multiply by 10

Quick solution to make it at least somewhat useful.

16 months agorepeat markers (prefixed /)
Mischa POSLAWSKY [Mon, 21 Nov 2022 19:12:22 +0000 (20:12 +0100)]
repeat markers (prefixed /)

16 months agoreport variables always formatted on trailing +
Mischa POSLAWSKY [Mon, 21 Nov 2022 17:21:29 +0000 (18:21 +0100)]
report variables always formatted on trailing +

Random character chosen to fix sum values (t1602-float_statistics &a)
without obscure code invocations.

16 months agoreport variables unformatted on trailing #
Mischa POSLAWSKY [Sun, 20 Nov 2022 23:43:23 +0000 (00:43 +0100)]
report variables unformatted on trailing #

More syntax stolen from exiftool.

16 months agorecurse nested braces in report variables
Mischa POSLAWSKY [Sun, 20 Nov 2022 23:37:11 +0000 (00:37 +0100)]
recurse nested braces in report variables

16 months agocatch errors in report templates
Mischa POSLAWSKY [Sun, 20 Nov 2022 22:49:16 +0000 (23:49 +0100)]
catch errors in report templates

16 months agoexperimental statistics report template (varfmt)
Mischa POSLAWSKY [Sun, 20 Nov 2022 17:31:35 +0000 (18:31 +0100)]
experimental statistics report template (varfmt)

Syntax similar to `exiftool -p $(name; code)` except with curly braces like
perl or shell variables.

16 months agoextend units from quecto to Quetta
Mischa POSLAWSKY [Tue, 22 Nov 2022 22:38:11 +0000 (23:38 +0100)]
extend units from quecto to Quetta

Recently accepted in the 27th BIPM meeting.

16 months agoreuse relative value calculation
Mischa POSLAWSKY [Sat, 19 Nov 2022 21:49:25 +0000 (22:49 +0100)]
reuse relative value calculation

Duplicated logic since spark, aggravated by log logic.
Improves graphs by cropping to maxval as well.

16 months agologarithmic scale option
Mischa POSLAWSKY [Sat, 19 Nov 2022 19:26:02 +0000 (20:26 +0100)]
logarithmic scale option

Outstanding wishlist.

16 months agoversion 1.09 before adding even more complex features v1.09
Mischa POSLAWSKY [Mon, 21 Nov 2022 21:35:31 +0000 (22:35 +0100)]
version 1.09 before adding even more complex features

16 months agodatabase examples compatible with sqlite
Mischa POSLAWSKY [Fri, 18 Nov 2022 20:34:12 +0000 (21:34 +0100)]
database examples compatible with sqlite

Real life use cases.

Commandline SQL changed to apply to SQLite as well.  Unfortunately maths
requires v3.35, so keep psql there even though it requires user setup.

16 months agodistinguish column -n argument in examples
Mischa POSLAWSKY [Fri, 18 Nov 2022 19:17:31 +0000 (20:17 +0100)]
distinguish column -n argument in examples

Required in common 4.3BSD version, but entirely incompatible with the
linux-util replacement on at least modern Debian.

16 months agoexplain -w default (COLUMNS environment)
Mischa POSLAWSKY [Fri, 18 Nov 2022 19:12:02 +0000 (20:12 +0100)]
explain -w default (COLUMNS environment)

16 months agot: untested formatting/marker features
Mischa POSLAWSKY [Fri, 18 Nov 2022 19:01:37 +0000 (20:01 +0100)]
t: untested formatting/marker features

16 months agot/examples: optional sample/media as exiftool input
Mischa POSLAWSKY [Sat, 19 Nov 2022 18:49:59 +0000 (19:49 +0100)]
t/examples: optional sample/media as exiftool input

16 months agot/examples: skip downloads unless enabled
Mischa POSLAWSKY [Thu, 17 Nov 2022 21:34:24 +0000 (22:34 +0100)]
t/examples: skip downloads unless enabled

Alleviate external resources further unless sample/data exists.

16 months agot/examples: skip missing command dependencies
Mischa POSLAWSKY [Thu, 17 Nov 2022 20:41:49 +0000 (21:41 +0100)]
t/examples: skip missing command dependencies

Assume requirement at line start, and not a mistake if not found locally.

16 months agot/examples: record resulting output for review
Mischa POSLAWSKY [Thu, 17 Nov 2022 18:16:03 +0000 (19:16 +0100)]
t/examples: record resulting output for review

16 months agot/examples: test and save curl downloads
Mischa POSLAWSKY [Thu, 17 Nov 2022 03:30:25 +0000 (04:30 +0100)]
t/examples: test and save curl downloads

16 months agomake install rule to copy to /usr/local/bin
Mischa POSLAWSKY [Wed, 16 Nov 2022 20:17:12 +0000 (21:17 +0100)]
make install rule to copy to /usr/local/bin

16 months agocombined value and sum formatting, --reformat
Mischa POSLAWSKY [Sun, 20 Nov 2022 17:17:14 +0000 (18:17 +0100)]
combined value and sum formatting, --reformat

Apply value-format to all stat values; exception to keep unformatted input
indicated by an experimental reformat option.

16 months agolength padding on formatted values
Mischa POSLAWSKY [Thu, 17 Nov 2022 18:23:12 +0000 (19:23 +0100)]
length padding on formatted values

16 months agoreserve minimal length for -H formatting
Mischa POSLAWSKY [Tue, 15 Nov 2022 17:23:46 +0000 (18:23 +0100)]
reserve minimal length for -H formatting

Without a more expensive calculation, assume regular results of 3 digits and
a unit, without sign and exponent for which the reserved amount would still
be insufficient.

16 months agosupport negative sexagesimal times
Mischa POSLAWSKY [Tue, 15 Nov 2022 12:41:48 +0000 (13:41 +0100)]
support negative sexagesimal times

Work around perl's weird modulo op.

16 months agosexagesimal time formatting option
Mischa POSLAWSKY [Mon, 14 Nov 2022 23:33:56 +0000 (00:33 +0100)]
sexagesimal time formatting option

Convert duration values from previous examples; like ffprobe -sexagesimal.

16 months agocompare media example (exiftool, ffprobe)
Mischa POSLAWSKY [Mon, 14 Nov 2022 23:31:16 +0000 (00:31 +0100)]
compare media example (exiftool, ffprobe)

Personal use case featuring two popular tools with different strengths and
interfaces.

Omit a third alternative with similar results due to being objectively much
worse in my experience:

mediainfo --inform='General;%Duration% %OverallBitRate% %FileNameExtension%\n' *

16 months agoshorthand -f+ for first number (+0)
Mischa POSLAWSKY [Sun, 20 Nov 2022 17:50:45 +0000 (18:50 +0100)]
shorthand -f+ for first number (+0)

16 months agoprefix + to select numeric fields in -f
Mischa POSLAWSKY [Mon, 14 Nov 2022 23:19:41 +0000 (00:19 +0100)]
prefix + to select numeric fields in -f

Possible using regular expressions, but needlessly complex for such a common
use or desire.

16 months agoswap -C to enable color, -M to disable
Mischa POSLAWSKY [Mon, 14 Nov 2022 15:50:44 +0000 (16:50 +0100)]
swap -C to enable color, -M to disable

Inconsistent in other programs, but lets copy somewhat related `jq` instead.
Afaict mostly `watch` has -c, and that's for input interpretation.
Frees lowercase c for Count or Column.

16 months agoNO_COLOR environment as default --color
Mischa POSLAWSKY [Mon, 14 Nov 2022 15:42:11 +0000 (16:42 +0100)]
NO_COLOR environment as default --color

Popular standard explained on: https://no-color.org/

16 months agorestrict spark index to maximum value
Mischa POSLAWSKY [Sun, 13 Nov 2022 14:28:46 +0000 (15:28 +0100)]
restrict spark index to maximum value

16 months agotreat zero as non-empty spark value
Mischa POSLAWSKY [Sun, 13 Nov 2022 14:17:09 +0000 (15:17 +0100)]
treat zero as non-empty spark value

16 months agoprotest against unknown palette presets
Mischa POSLAWSKY [Sun, 13 Nov 2022 02:28:32 +0000 (03:28 +0100)]
protest against unknown palette presets

16 months agorotate sparkless indicators default
Mischa POSLAWSKY [Sat, 12 Nov 2022 23:52:17 +0000 (00:52 +0100)]
rotate sparkless indicators default

16 months agorandom palette of 215 colours
Mischa POSLAWSKY [Sun, 13 Nov 2022 00:44:16 +0000 (01:44 +0100)]
random palette of 215 colours

Distinguish a limited number of values without regard for order.

16 months agorainbow (lolcat) colour palette
Mischa POSLAWSKY [Sat, 12 Nov 2022 23:43:16 +0000 (00:43 +0100)]
rainbow (lolcat) colour palette

16 months agoretire 88-colour palettes
Mischa POSLAWSKY [Sat, 12 Nov 2022 23:38:35 +0000 (00:38 +0100)]
retire 88-colour palettes

Assume 256color terminals nowadays; even Debian's oldstable rxvt-unicode has
switched defaults.

16 months agosimplify or clean up example scriptlets
Mischa POSLAWSKY [Sat, 12 Nov 2022 23:37:24 +0000 (00:37 +0100)]
simplify or clean up example scriptlets

16 months agocrop limits beyond available lines
Mischa POSLAWSKY [Sat, 12 Nov 2022 23:06:49 +0000 (00:06 +0100)]
crop limits beyond available lines

Silence warnings about unitialized values.

16 months agoprefix indicators option without spark
Mischa POSLAWSKY [Sun, 6 Nov 2022 14:05:23 +0000 (15:05 +0100)]
prefix indicators option without spark

17 months agofull distribution over sparkline indicators
Mischa POSLAWSKY [Sun, 6 Nov 2022 14:04:05 +0000 (15:04 +0100)]
full distribution over sparkline indicators

No unexpected min/max exceptions.

17 months agoprepare to fix spark distribution
Mischa POSLAWSKY [Wed, 2 Nov 2022 19:47:44 +0000 (20:47 +0100)]
prepare to fix spark distribution

Test case which is seriously broken rn.

17 months agoversion 1.08 with extra cat v1.08
Mischa POSLAWSKY [Tue, 1 Nov 2022 18:43:50 +0000 (19:43 +0100)]
version 1.08 with extra cat

17 months agodraw mascot cat in usage message
Mischa POSLAWSKY [Tue, 1 Nov 2022 18:41:46 +0000 (19:41 +0100)]
draw mascot cat in usage message

17 months agomove sparkline example below interrupted git group
Mischa POSLAWSKY [Mon, 31 Oct 2022 19:57:55 +0000 (20:57 +0100)]
move sparkline example below interrupted git group

17 months agoempty program arguments do not need to be parsed
Mischa POSLAWSKY [Mon, 31 Oct 2022 19:53:24 +0000 (20:53 +0100)]
empty program arguments do not need to be parsed

Using Getopt::Long takes ~the same time as running the rest of the script,
about 250ms on a rpi1, so runtime can be halved if there's no options.

17 months agot: planned test count beforehand
Mischa POSLAWSKY [Mon, 31 Oct 2022 19:49:22 +0000 (20:49 +0100)]
t: planned test count beforehand

Small effort to indicate units size, allowing rough eta estimation.

17 months agounit rounding corner case
Mischa POSLAWSKY [Mon, 31 Oct 2022 16:08:57 +0000 (17:08 +0100)]
unit rounding corner case

Earlier commits did not account for odd unit offsets with one less digit
like 9950 rounding to 10.0k (or 9.9k with the previous fix) instead of 10k.

17 months agounit formatting of negatives
Mischa POSLAWSKY [Mon, 31 Oct 2022 19:38:28 +0000 (20:38 +0100)]
unit formatting of negatives

17 months agokeep valueless lines as is
Mischa POSLAWSKY [Mon, 31 Oct 2022 19:23:05 +0000 (20:23 +0100)]
keep valueless lines as is

No padding or graph (from negative minimums).

17 months agoshift unit to prevent additional digits after rounding
Mischa POSLAWSKY [Mon, 31 Oct 2022 15:40:35 +0000 (16:40 +0100)]
shift unit to prevent additional digits after rounding

Fix 0.9995 from showing up as 1000m instead of 1.0.

17 months agostatic usage text, generation code into reformat-podusage script
Mischa POSLAWSKY [Mon, 31 Oct 2022 14:33:19 +0000 (15:33 +0100)]
static usage text, generation code into reformat-podusage script

Significantly faster and less convoluted, at the small cost of tracking some
documentation twice.

17 months agot: ensure failure if field gets fed an invalid regexp value
Mischa POSLAWSKY [Tue, 4 Feb 2020 14:06:39 +0000 (15:06 +0100)]
t: ensure failure if field gets fed an invalid regexp value

17 months agonegative limit range counting from end
Mischa POSLAWSKY [Sun, 28 Mar 2021 02:51:55 +0000 (04:51 +0200)]
negative limit range counting from end

17 months agonegative limit counts from last line
Mischa POSLAWSKY [Sat, 27 Mar 2021 22:57:35 +0000 (23:57 +0100)]
negative limit counts from last line

23 months agot: planned feature for negative limits
Mischa POSLAWSKY [Sat, 27 Mar 2021 21:59:58 +0000 (22:59 +0100)]
t: planned feature for negative limits

Do not count names ending in #TODO as failing.

23 months agoapply value formatting to statistics
Mischa POSLAWSKY [Sat, 27 Mar 2021 21:58:25 +0000 (22:58 +0100)]
apply value formatting to statistics

23 months agoascii option to avoid unicode
Mischa POSLAWSKY [Fri, 19 Mar 2021 02:59:09 +0000 (03:59 +0100)]
ascii option to avoid unicode

23 months agocapture error messages from examples
Mischa POSLAWSKY [Fri, 19 Mar 2021 02:40:22 +0000 (03:40 +0100)]
capture error messages from examples

23 months agoIPC::Run to run example commands
Mischa POSLAWSKY [Fri, 19 Mar 2021 02:36:43 +0000 (03:36 +0100)]
IPC::Run to run example commands

23 months agodeclare value formatting functions in options
Mischa POSLAWSKY [Thu, 18 Mar 2021 18:41:37 +0000 (19:41 +0100)]
declare value formatting functions in options

23 months agoround partial sum to avoid floating point errors
Mischa POSLAWSKY [Sat, 13 Mar 2021 06:16:29 +0000 (07:16 +0100)]
round partial sum to avoid floating point errors

Optional value available since commit v1.03-19-g0938debbad (2019-09-08)
[indicate limited results in stats] was overlooked while fixing formatting
in v1.06-24-g28f38df922 (2019-10-08) [round total value in statistics].

23 months agocomment long regexp in usage preparation
Mischa POSLAWSKY [Sat, 13 Mar 2021 06:08:09 +0000 (07:08 +0100)]
comment long regexp in usage preparation

Insert whitespace and comments for readability.

23 months agostrip pipe arguments from test options
Mischa POSLAWSKY [Sat, 13 Mar 2021 06:03:13 +0000 (07:03 +0100)]
strip pipe arguments from test options

Allow combination of -value and |command (or ?status) suffixes,
without the latter part being duplicated.

23 months agofollow download redirects in example scripts
Mischa POSLAWSKY [Sat, 13 Mar 2021 05:51:27 +0000 (06:51 +0100)]
follow download redirects in example scripts

Found by examples.t tester because curl commands were literally incomplete.

23 months agocustom diagnostics in example test failure
Mischa POSLAWSKY [Sat, 13 Mar 2021 05:42:54 +0000 (06:42 +0100)]
custom diagnostics in example test failure

Replace constant "Failed test at line" by a more interesting report of
source location and result discrepancy.