| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/1/root/usr/include/dovecot/ |
Upload File : |
#ifndef STATS_DIST_H
#define STATS_DIST_H
struct stats_dist *stats_dist_init(void);
struct stats_dist *stats_dist_init_with_size(unsigned int sample_count);
void stats_dist_deinit(struct stats_dist **stats);
/* Reset all events. */
void stats_dist_reset(struct stats_dist *stats);
/* Add a new event. */
void stats_dist_add(struct stats_dist *stats, uint64_t value);
/* Returns number of events added. */
unsigned int stats_dist_get_count(const struct stats_dist *stats);
/* Returns the sum of all events. */
uint64_t stats_dist_get_sum(const struct stats_dist *stats);
/* Returns events' minimum. */
uint64_t stats_dist_get_min(const struct stats_dist *stats);
/* Returns events' maximum. */
uint64_t stats_dist_get_max(const struct stats_dist *stats);
/* Returns events' average. */
double stats_dist_get_avg(const struct stats_dist *stats);
/* Returns events' approximate (through random subsampling) median. */
uint64_t stats_dist_get_median(struct stats_dist *stats);
/* Returns events' variance */
double stats_dist_get_variance(const struct stats_dist *stats);
/* Returns events' approximate (through random subsampling) percentile.
fraction parameter is in the range (0., 1.], so 95th %-ile is 0.95. */
uint64_t stats_dist_get_percentile(struct stats_dist *stats, double fraction);
/* Returns events' approximate (through random subsampling) 95th percentile. */
static inline uint64_t stats_dist_get_95th(struct stats_dist *stats)
{
return stats_dist_get_percentile(stats, 0.95);
}
/* Returns the sample array */
const uint64_t *stats_dist_get_samples(const struct stats_dist *stats,
unsigned int *count_r);
#endif