RESULTS(3)
๐ lmbench result management โ the results subsystem, bestie ๐
okay so this is the lmbench result management page, manual section 3, and honestly? it's giving "small but mighty". it's the little crew of functions that hold onto your timing results so you don't have to. let's get into it ๐
โจ NAME โจ
insertinit, insertsort, get_results, set_results, save_median, save_minimum โ the lmbench results subsystem. that's the whole squad right there ๐ซถ
๐ธ SYNOPSIS ๐ธ
#include ``lmbench.h''
#define TRIES 11
typedef struct { uint64 u, n } value_t;
typedef struct { int N; value_t v[TRIES]; } result_t;
int sizeof_result(int N)
void insertinit(result_t *r)
void insertsort(uint64 u, uint64 n, result_t *r)
result_t* get_results()
void set_results(result_t *r)
void save_median()
void save_minimum()
look at that. TRIES is 11, value_t is a struct of uint64 u, n, and result_t is int N plus value_t v[TRIES]. iconic. no notes. โจ
๐ DESCRIPTION ๐
so these routines provide some simple data management functionality. and listen โ in most cases, you will not need these routines. fr fr. they're the backstage crew, not the main character.
the current timing results can be accessed using the routines in timing(3). and if you wanna modify the current timing results, that's what save_median and save_minimum are for ๐
๐ฆ the functions, one by one
int sizeof_result(int N)โ returns the number of bytes you need to allocate for aresult_tthat containsNresults. it's literally just the size math, and it's here for you ๐ซถvoid insertinit(result_t *r)โ initializes the results array. fresh start energy ๐ธvoid insertsort(uint64 u, uint64 n, result_t *r)โ insertsuandnintor. results are sorted in decreasing order byu/n. yes bestie, decreasing. noted. ๐ฅvoid get_results(result_t *r)โ gets a copy of the current results. a lil snapshot ๐ธvoid set_results(result_t *r)โ saves a copy ofras the current results. now this is the current one, periodt.void save_median()โ sets the timing results to the median of the current results. middle-of-the-road but make it slay ๐void save_minimum()โ sets the timing restuls to the minimum of the current results. (yes, the original says "restuls" โ we're keeping it exactly as written, no cap ๐)
and here's the part you gotta hold onto: results are sorted in ascending order, so the minimum value is atTRIES-1and the maximum value is at0. so likeโฆ indexTRIES-1= smallest, index0= biggest. remember it, bestie, because that's a whole vibe shift from the decreasing-order thing up there. both are in the original, both are yours now ๐ง
๐ฎ FUTURES ๐ฎ
development of lmbench is continuing. it's not over, it's just getting started โจ
๐ SEE ALSO ๐
(the fact that this page is also results(3) and links to results(3)? we don't ask questions, we just link ๐)
๐ AUTHOR ๐
Carl Staelin and Larry McVoy ๐ซถ absolute legends.
and: comments, suggestions, and bug reports are always welcome. so like, slide into their inbox, they genuinely want to hear it ๐ธ
copyright (c)1998 Larry McVoy, and the date line is $Date:$ (yes, it's just sitting there empty, we love a mysterious timestamp ๐). this was the lmbench result management page, section 3 of the manual โ thanks for reading, bestie, go forth and manage those results ๐
โจ๐ฆ
๐ฆ 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