/libMicro

Primary LanguageCOtherNOASSERTION

A portable set of microbenchmarks focused on the syscall and system
library interfaces.

Originally made open source in 2005 by Bart Smaalders and Phil Harman
of Sun Microsystems (1) as part of their "if Linux is faster it's a
Solaris bug" campaign. The code mostly "just works" but has atrophied
slightly over the years.

This is a fork by Ryan Zezeski, not be confused with Peter Portante's
"fork" (2), which has seen no development. Starting source pulled
from the java.net projects page (3). My intentions are to squash bugs,
add missing syscalls, and make sure this works on as many platforms as
possible. I also plan to document everything—extensively.

(1): https://blogs.oracle.com/barts/entry/libmicro_opensourced

(2): https://github.com/portante/libMicro

(3): https://java.net/projects/libmicro


LICENSE

This code is supplied under the terms of the Common Development and
Distribution License ("CDDL"), version 1.0. A full copy of the license
is found in the file OPENSOLARIS.LICENSE, or on the net at
http://www.illumos.org/license/CDDL.


BUILDING

You'll need a C compiler and make.

$ make


RUNNING

Benchmarks can be run individually and take many options, but the
easiest way to get started is to run the master bench script.

$ ./bench | tee bench.out

You'll want to collect the output in a file because there is a lot of
it and it serves as input for the `multiview` script that allows you
to compare multiple benchmark runs.


COMPARE

You can compare two or more runs with the multiview script. The first
argument is the reference benchmark which all the other inputs will be
compared to. The generated HTML will use a red/green color gradient to
convey how far above or below each run was compared to the reference
run. For example, if I wanted to prove that illumos was beating Linux
I would generate the following compare:

$ ./multiview bench-linux.out bench-illumos.out > compare.html


OPTIONS

These are options that apply to all benchmarks and can be passed
directly to a test or by modifying `OPTS` in `bench`.

       [-1] (single process; overrides -P > 1)
       [-A] (align with clock)
       [-C target number of samples per thread (default 100)]
       [-D maximum duration in secs (default 5 secs)]
       [-E (echo name to stderr)]
       [-H] (suppress headers)
       [-L] (print argument line)
       [-M] (reports mean rather than median)
       [-N test-name ]
       [-P processes (default 1)]
       [-S] (print detailed stats)
       [-T threads (default 1)]
       [-V] (print the libMicro version and exit)