Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
timestats.h
Go to the documentation of this file.
1
11#pragma once
12#include "epan/packet_info.h"
13#include "wsutil/nstime.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif /* __cplusplus */
18
22typedef struct _timestat_t {
23 uint32_t num;
24 uint32_t min_num;
25 uint32_t max_num;
29 double variance;
31
32/* functions */
33
39WS_DLL_PUBLIC void time_stat_init(timestat_t *stats);
40
50WS_DLL_PUBLIC void time_stat_update(timestat_t *stats, const nstime_t *delta, packet_info *pinfo);
51
59WS_DLL_PUBLIC double get_average(const nstime_t *sum, uint32_t num);
60
61#ifdef __cplusplus
62}
63#endif /* __cplusplus */
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Accumulates time delay samples for computing min, max, total, and variance statistics over a set of m...
Definition timestats.h:22
uint32_t num
Definition timestats.h:23
double variance
Definition timestats.h:29
nstime_t min
Definition timestats.h:26
uint32_t max_num
Definition timestats.h:25
nstime_t tot
Definition timestats.h:28
nstime_t max
Definition timestats.h:27
uint32_t min_num
Definition timestats.h:24
Definition nstime.h:26
WS_DLL_PUBLIC void time_stat_update(timestat_t *stats, const nstime_t *delta, packet_info *pinfo)
Update time statistics with a new sample.
Definition timestats.c:31
struct _timestat_t timestat_t
Accumulates time delay samples for computing min, max, total, and variance statistics over a set of m...
WS_DLL_PUBLIC double get_average(const nstime_t *sum, uint32_t num)
Calculate the average time from a sum of time values.
Definition timestats.c:66
WS_DLL_PUBLIC void time_stat_init(timestat_t *stats)
Initialize a timestat_t structure.
Definition timestats.c:18