My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Functions
timeseries.h File Reference
#include "stats.h"
#include <time.h>
#include "dfg.h"

Go to the source code of this file.

Classes

struct  timed_rrdb
 Round-robin database (circular buffer) for storing timeseries data. More...
 

Macros

#define RRDB_ENTRIES   240
 timeseries.h More...
 

Functions

double average_n (struct timed_rrdb *timeseries, int n_samples)
 Calculates the average of the last n stats for a given MSU. More...
 
int append_to_timeseries (struct timed_stat *input, int input_size, struct timed_rrdb *timeseries)
 Appends a number of timed statistics to a timeseries. More...
 
void print_timeseries (struct timed_rrdb *ts)
 Prints the beginning and end of a timeseries. More...
 

Macro Definition Documentation

#define RRDB_ENTRIES   240

timeseries.h

Contains code relevant to storing and processing a round-robin database of timeseriesThe maximum length of the round-robin database

Definition at line 32 of file timeseries.h.

Function Documentation

int append_to_timeseries ( struct timed_stat input,
int  input_size,
struct timed_rrdb timeseries 
)

Appends a number of timed statistics to a timeseries.

Parameters
inputThe timed statistics to append to the timeseries
input_sizeThe length of *input
timeseriesThe timeseries to which the data is to be appended
Returns
0 on success

Definition at line 58 of file timeseries.c.

double average_n ( struct timed_rrdb timeseries,
int  n_samples 
)

Calculates the average of the last n stats for a given MSU.

Calculates the average of the last n stats for a given MSU.

Contains code relevant to storing and processing a round-robin database of timeseries

Definition at line 31 of file timeseries.c.

void print_timeseries ( struct timed_rrdb timeseries)

Prints the beginning and end of a timeseries.

Parameters
timeseriesThe timeseries to print

Definition at line 82 of file timeseries.c.