#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 ITIME 10 |
#define NO_ITIMER |
Definition at line 25 of file speeds.cpp.
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 }
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 |
struct tms tstart tfinish |