History log of /freebsd-current/usr.bin/ministat/ministat.c
Revision Date Author Comments
# 5e3934b1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 7776d3cc 18-Dec-2021 Robert Watson <rwatson@FreeBSD.org>

Add a -q flag to ministat to suppress headers in output, for use with -n.

Reviewed by: jrtc27
Differential Revision: https://reviews.freebsd.org/D33724
MFC after: 2 weeks


# 446d49d7 03-Feb-2020 Poul-Henning Kamp <phk@FreeBSD.org>

Minor cleanups to allow handing vast datasets.

Submitted by: dds


# 9febfb79 18-Oct-2019 Poul-Henning Kamp <phk@FreeBSD.org>

Improve the way we calculate variance to reduce the rounding errors
when variance is small relative to data points.

Now [0, 1, 2] shows same standard deviation as [10000000000000, ...1, ...2]

Also: Various nitpickery from my own tree.


# 7672a014 19-Jun-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.

No functional change intended.


# a9cf54b0 21-Feb-2018 Ed Maste <emaste@FreeBSD.org>

ministat: disallow negative variance / nan Stddev

With all values identical it was possible for Var() to return a negative
value due to limited floating point precision, resulting in "nan"
reported as Stddev.

Variance cannot actually be negative, so just return 0. We can later
investigate alternate algorithms for calculating variance to reduce the
effect of catastrophic cancellation here.

Reported by: Arshan Khanifar <arshankhanifar_gmail.com>
Approved by: phk
Sponsored by: The FreeBSD Foundation


# 64de3fdd 30-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

SPDX: use the Beerware identifier.


# 20502a13 15-Dec-2016 Conrad Meyer <cem@FreeBSD.org>

ministat(1): Capsicumify

Separate dataset opening from reading/parsing. The number of input
files is already capped to a small number, so just open all input files
before sandboxing.

Feedback from: allanjude@ (earlier version), emaste@ (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7925


# a304ad90 05-Nov-2016 Colin Percival <cperciva@FreeBSD.org>

Reduce the bogosity of ministat's % difference calculations.

The previous calculation used an approximation which was only valid in
cases where the means being compared were similar; this resulted in very
odd claims being made, e.g. that 0 +/- 0 is a difference of -100% +/- 1%
from 100 +/- 1.

The new calculation scales sample standard deviations by the means, and
yields approximately correct percentage difference bounds providing that
the reference population is bounded away from zero. (In the case where
the values being compared are not sufficiently bounded away from zero,
the distribution of ratios becomes much harder to calculate, and is not
likely to be useful anyway.)

Note that when ministat is used for its intended purpose of determining
whether two samples are statistically different, this change is unlikely
to have any noticeable effect; in such cases the means will be similar
enough that the correction applied here will be minimal.


# 19d3ba99 23-Nov-2015 Marcelo Araujo <araujo@FreeBSD.org>

Compute the median of the data set as the midpoint between the two middle
values when the data set has an even number of elements.

PR: 201582
Submitted by: Marcus Reid <marcus@blazingdot.com>
Reviewed by: imp
Approved by: bapt (mentor)


# 8239de9b 15-Jul-2015 John-Mark Gurney <jmg@FreeBSD.org>

fix error message... errx since errno may not be set (if we didn't
parse the full field), and err and errx add their own newline at the
end...

Sponsored by: Netflix, Inc.


# 7e8dfdf1 17-Feb-2015 Pedro F. Giffuni <pfg@FreeBSD.org>

ministat(1): replace malloc + memset with calloc.

Reviewed by: phk


# b0cba336 12-Mar-2014 Poul-Henning Kamp <phk@FreeBSD.org>

Make ministat CRNL tolerant by stripping all isspace() from the tail
end of input lines.


# aa374634 15-Nov-2012 Eitan Adler <eadler@FreeBSD.org>

Add option to suppress just the plot in ministat while still retaining
the relative comparison (i.e., useful part).

Approved by: cperciva
MFC after: 3 days


# 23f01dcf 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Add missing static keywords to ministat(1)


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# e8c2f0b3 17-Mar-2009 David Malone <dwmalone@FreeBSD.org>

Fix some warns - mainly signedness and unused variables.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 65a9b182 16-Oct-2008 Poul-Henning Kamp <phk@FreeBSD.org>

Free old arrays if we increase them.

Pointed out by: mlaier


# c4f431a6 16-Oct-2008 Poul-Henning Kamp <phk@FreeBSD.org>

Make ministat(1) vastly faster on huge datasets.


# 84eebcc2 08-Feb-2008 David Malone <dwmalone@FreeBSD.org>

WARNS fixes: remove two unused variables and add some constness.


# fd023260 28-Aug-2006 Poul-Henning Kamp <phk@FreeBSD.org>

Improve input parsing:

Add "-C <column>" and "-d <delims>" options to chop up input lines.

Make '#' a comment character, rest of line is ignored.

Submitted by: Dmitry Morozovsky <marck@rinet.ru>


# 5f72b6ac 02-May-2006 Poul-Henning Kamp <phk@FreeBSD.org>

Avoid coredumps if stddev cannot be computed (if all datapoints are identical)
Small cleanup of label printing.


# d2f4defe 23-Feb-2006 Wojciech A. Koszek <wkoszek@FreeBSD.org>

Fix the way in which median is calculated. If the data source has even
number of data points, value should be calculated by adding two middle
elements and dividing them by 2.

Approved by: cognet (mentor)


# c153cdd1 21-Feb-2006 Matthew N. Dodd <mdodd@FreeBSD.org>

Add option -w to specify graph width.
Use COLUMNS, terminal width for default graph width.

Reviewed by: rwatson


# 4a7f3dce 21-Jul-2005 Poul-Henning Kamp <phk@FreeBSD.org>

In 2003, a -s flag was added to ministat to separate the
avg/median/stddev bars onto separate lines for readability if the
ranges overlapped. In 2005, ministat was extended to support more than
2 datasets, but the -s code was not updated. It will coredump if run
with -s and >2 sets.

PR: 82909
Submitted by: Dan Nelson <dnelson@allantgroup.com>


# cd05b0f7 27-May-2005 Robert Watson <rwatson@FreeBSD.org>

dd a '-n' option to ministat, which causes it to display only summary
statistics, not graph and statistical test output. Useful for automated
processing.


# afe98543 12-Apr-2005 Matthew N. Dodd <mdodd@FreeBSD.org>

Add support for more than two datasets. Currently limited to 7 though
the limit is only the number of meaningful graph symbols available.

Statistical comparison is performed between the first dataset and
any further datasets.

No objection by: phk


# 573e036e 31-Oct-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Attached is a small patch to ministat that separates the
avg/median/stddev bars onto two lines. Useful for datasets that
overlap.

Submitted by: Dan Nelson <dnelson@allantgroup.com>


# a21af191 18-Aug-2003 Poul-Henning Kamp <phk@FreeBSD.org>

In case of zero span data supress the histogram plot.


# 3b9b37bd 13-Aug-2003 Poul-Henning Kamp <phk@FreeBSD.org>

A small statistics tool for gauging the statistical significance
of data from benchmarks etc. Implements "Student's t" for various
confidence levels, defaults to 95%.

If your benchmarks are not significant at the 95% confidence level,
we don't want to hear about it.