Timing/report.c File Reference

Common reporting code

Implements a standard reporting approach used throughout the repository. More...

#include <stdio.h>
#include <string.h>
#include "report.h"

Functions

long diffTimer (struct timeval *before, struct timeval *after)
 This code is used by both C and C++.
char * timingString (long usecs)
 Convert microseconds into string showing seconds and microseconds.
void printDiffTimer (long usecs)
 Print the time difference.
void report (long usecs)
 Standard reporting system.
void reportUsage ()
 No special usage.

Variables

long __compTotal = 0
 reporting variables to be defined in report.c
long __compNilTotal = 0
long __swapTotal = 0
 defined here so we can reuse code compiled for use with benchmarking.
static char packed [64]


Detailed Description

Common reporting code

Implements a standard reporting approach used throughout the repository.

Author:
George Heineman
Date:
6/15/08

Function Documentation

long diffTimer ( struct timeval *  before,
struct timeval *  after 
)

This code is used by both C and C++.

Parameters:
before Time before a computation started
after Time when a computation completed
Returns:
difference of these two times in long microseconds.

void printDiffTimer ( long  usecs  ) 

Print the time difference.

void report ( long  usecs  ) 

Standard reporting system.

Parameters:
usecs absolute time amount.

void reportUsage (  ) 

No special usage.

char* timingString ( long  usecs  ) 

Convert microseconds into string showing seconds and microseconds.

Parameters:
usecs absolute time amount in microseconds
Returns:
a char* string representing "N.M" seconds.


Variable Documentation

long __compNilTotal = 0

long __compTotal = 0

reporting variables to be defined in report.c

long __swapTotal = 0

defined here so we can reuse code compiled for use with benchmarking.

char packed[64] [static]

Algorithm Development Kit 1.0