timing.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * $Id$
  3. */
  4. #ifndef _TIMING_H
  5. #define _TIMING_H
  6. void setmeantime(double usecs);
  7. void setvariancetime(double usecs);
  8. double getvariancetime(void);
  9. double getmeantime(void);
  10. void setmeanratetime(double usecs);
  11. void setvarianceratetime(double usecs);
  12. double getvarianceratetime(void);
  13. double getmeanratetime(void);
  14. double calc_variance(double mean, double *times, int size);
  15. double calc_variance_rate(double mean, double *times, int size,
  16. int ops_per_measure);
  17. double calc_mean(double *times, int size);
  18. double calc_mean_rate(double *times, int size, int ops_per_measure);
  19. char *p64(uint64 big);
  20. char *p64sz(uint64 big);
  21. double Delta(void);
  22. double Now(void);
  23. void adjust(int usec);
  24. void bandwidth(uint64 bytes, uint64 times, int verbose);
  25. size_t bytes(char *s);
  26. void context(uint64 xfers);
  27. uint64 delta(void);
  28. int get_enough(int);
  29. uint64 get_n(void);
  30. void kb(uint64 bytes);
  31. double l_overhead(void);
  32. char last(char *s);
  33. void latency(uint64 xfers, uint64 size);
  34. void mb(uint64 bytes);
  35. void micro(char *s, uint64 n);
  36. void micromb(uint64 mb, uint64 n);
  37. void milli(char *s, uint64 n);
  38. void morefds(void);
  39. void nano(char *s, uint64 n);
  40. uint64 now(void);
  41. void ptime(uint64 n);
  42. void rusage(void);
  43. void save_n(uint64);
  44. void settime(uint64 usecs);
  45. void start(struct timeval *tv);
  46. uint64 stop(struct timeval *begin, struct timeval *end);
  47. uint64 t_overhead(void);
  48. double timespent(void);
  49. void timing(FILE *out);
  50. uint64 tvdelta(struct timeval *, struct timeval *);
  51. void tvsub(struct timeval *tdiff, struct timeval *t1, struct timeval *t0);
  52. void print_results(int details);
  53. void use_int(int result);
  54. void use_pointer(void *result);
  55. uint64 usecs_spent(void);
  56. void touch(char *buf, size_t size);
  57. #if defined(hpux) || defined(__hpux) || defined(WIN32)
  58. int getpagesize();
  59. #endif
  60. #endif /* _TIMING_H */