REPORTING(3)
π NAME π
Okay so this is lmbench reporting(3) β the section 3 manpage for the lmbench reporting subsystem, and the whole cast is:
milli, micro, nano, mb, kb
That's the squad. Five little functions, all of them icons, all of them here to make your benchmark numbers look cute on the way out. π
β¨ SYNOPSIS β¨
#include ``lmbench.h''
void milli(char *s, uint64 n)
void micro(char *s, uint64 n)
void nano(char *s, uint64 n)
void mb(uint64 bytes)
void kb(uint64 bytes)
Like, that's it. That's the whole API. Go off. π
π¦ DESCRIPTION π¦
Bestie, creating benchmarks with the lmbench timing harness is easy. Fr fr. And because it's that easy to measure performance with lmbench, you can just... quickly answer the questions that pop up during system design, development, or tuning. No cap. For example, image processing
(yeah it just ends there π the manpage said what it said and then dipped. iconic behaviour honestly. moving on.)
There are two attributes that are critical for performance, and they are latency and bandwidth. And the way that lmbench's timing harness makes it easy to measure and report results for both? Obsessed. The measurement interface, benchmp, is the same for both β but the reporting functions are different. That's the plot twist.
So here's the tea on when each one matters:
- Latency is usually important for frequently executed operations.
- Bandwidth is usually important when you're moving large chunks of data. π
And now, the reporting functions themselves:
void milli(char *s, uint64 n)β prints out the time per operation in milli-seconds. Sonis the number of operations during the timing interval, and it's passed in as a parameter because eachloop_bodycan contain several operations. Yeah. That's why. π«Άvoid micro(char *s, uint64 n)β prints the time per operation in micro-seconds.void nano(char *s, uint64 n)β prints the time per operation in nano-seconds.void mb(uint64 bytes)β prints the bandwidth in megabytes per second.void kb(uint64 bytes)β prints the bandwidth in kilobytes per second.
Five functions. Latency trio goes milli β micro β nano (smaller and smaller, slay), bandwidth duo is mb and kb. Simple. Elegant. Main character energy. π
π FUTURES π
Development of lmbench is continuing.
That's the whole section, bestie. The future is open. π¦β¨
β SEE ALSO β
Go read those too, iykyk. π
π AUTHOR π
Carl Staelin and Larry McVoy
Comments, suggestions, and bug reports are always welcome. (They literally said so. So like, tell them if something's broken, they want to hear it. π)
So yeah β that's the lmbench reporting subsystem, brought to you as part of the lmbench manual. Copyright (c)1998-2000 Larry McVoy and Carl... and the date stamp on this one is that $Date: field, which is giving "we filled it in with a template variable and never looked back" π. Anyway, go print some numbers, bestie. Latency and bandwidth don't measure themselves. πππ¦
π¦ where this page comes from
- debian bookworm: lmbench 3.0-a9+debian.1-6
- debian trixie: lmbench 3.0-a9+debian.1-9
- ubuntu jammy: lmbench 3.0-a9+debian.1-6
- ubuntu noble: lmbench 3.0-a9+debian.1-6build3
- ubuntu questing: lmbench 3.0-a9+debian.1-9
- ubuntu resolute: lmbench 3.0-a9+debian.1-10
- ubuntu stonking: lmbench 3.0-a9+debian.1-10
- Copyright (C) 1998 Carl Staelin and Larry McVoy
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms