mux/src/crypt/speeds.cpp File Reference

#include <signal.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/times.h>

Include dependency graph for speeds.cpp:

Go to the source code of this file.

Defines

#define NO_ITIMER
#define ITIME   10

Functions

char * crypt ()
char ** fcrypt ()
void Stop ()
static void clearmem (start, cnt) char *start

Variables

static int cnt
char * hz
tms tstart tfinish
int cnt


Define Documentation

#define ITIME   10

Definition at line 40 of file speeds.cpp.

Referenced by Stop().

#define NO_ITIMER

Definition at line 25 of file speeds.cpp.


Function Documentation

static void clearmem ( start  ,
cnt   
) [static]

char* crypt (  ) 

char* * fcrypt (  ) 

void Stop (  ) 

Definition at line 45 of file speeds.cpp.

References cnt, hz, ITIME, and tfinish.

00046 {
00047     double elapsed;
00048 #ifdef NO_ITIMER
00049     (void) times(&tfinish);
00050     elapsed = ((tfinish.tms_utime + tfinish.tms_stime) -
00051     (tstart.tms_utime + tstart.tms_stime)) / atoi(hz);
00052     printf("elapsed time = %d sec,  CPU time = %f sec\n", ITIME, elapsed);
00053 #else
00054     elapsed = ITIME;
00055 #endif
00056     printf ("Did %f %s()s per second.\n", ((float) cnt) / elapsed,
00057 #if defined(FCRYPT)
00058         "fcrypt"
00059 #else
00060         "crypt"
00061 #endif
00062     );
00063     exit (0);
00064 }


Variable Documentation

int cnt

Definition at line 74 of file speeds.cpp.

int cnt [static]

Definition at line 35 of file speeds.cpp.

Referenced by CHashFile::AllocateEmptyPage(), cache_pass2(), fcache_rawdump(), CHashPage::ReadPage(), Stop(), TIME_Initialize(), and CHashPage::WritePage().

char* hz

Definition at line 37 of file speeds.cpp.

Referenced by Stop().

struct tms tstart tfinish

Definition at line 38 of file speeds.cpp.

Referenced by Stop().


Generated on Mon May 28 04:40:14 2007 for MUX by  doxygen 1.4.7