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 a result_t that contains N results. 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) โ€” inserts u and n into r. results are sorted in decreasing order by u/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 of r as 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 at TRIES-1 and the maximum value is at 0. so likeโ€ฆ index TRIES-1 = smallest, index 0 = 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 ๐Ÿ’…โœจ๐Ÿฆ‹