From 884539f70154b0fefdf6905be893c0ceabca755f Mon Sep 17 00:00:00 2001 From: "Kenneth D. Merry" Date: Sat, 18 Aug 2001 05:46:59 +0000 Subject: Implement compute_stats() in terms of devstat_compute_statistics(). This gets rid of the duplicated code in compute_stats(). Add a new DSM_SKIP statistic type for devstat_compute_statistics() that causes the subsequent variable argument to be skipped. Thanks to Sergey Osokin for coding up my idea/code fragment. Submitted by: "Sergey A. Osokin" --- lib/libdevstat/devstat.3 | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/libdevstat/devstat.3') diff --git a/lib/libdevstat/devstat.3 b/lib/libdevstat/devstat.3 index 102d5821ed01..319b37e7e985 100644 --- a/lib/libdevstat/devstat.3 +++ b/lib/libdevstat/devstat.3 @@ -762,6 +762,18 @@ and .Va current . As above, this is not the true number of milliseconds per transaction, but rather the average rate of write transaction completion. +.It DSM_SKIP +type: N/A +.Pp +If you do not need a result from +.Fn devstat_compute_statistics , +just put +.Va DSM_SKIP +as first (type) parameter and +.Va NULL +as second parameter. +This can be useful in scenarios where the statistics to be calculated +are determined at run time. .El .Pp .Fn compute_stats -- cgit v1.3