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

Go to the source code of this file.

Macros

#define PRINT_LEN   6
 The length of the begnning and end of the timeseries that's printed when print_timeseries() is called. More...
 

Functions

double average_n (struct timed_rrdb *timeseries, int n_samples)
 timeseries.c 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 *timeseries)
 Prints the beginning and end of a timeseries. More...
 

Macro Definition Documentation

#define PRINT_LEN   6

The length of the begnning and end of the timeseries that's printed when print_timeseries() is called.

Definition at line 77 of file timeseries.c.

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 
)

timeseries.c

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.