stats.h 776 B

1234567891011121314151617181920212223242526272829303132
  1. /* Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 */
  2. /* For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt */
  3. #ifndef _COVERAGE_STATS_H
  4. #define _COVERAGE_STATS_H
  5. #include "util.h"
  6. #if COLLECT_STATS
  7. #define STATS(x) x
  8. #else
  9. #define STATS(x)
  10. #endif
  11. typedef struct Stats {
  12. unsigned int calls; /* Need at least one member, but the rest only if needed. */
  13. #if COLLECT_STATS
  14. unsigned int lines;
  15. unsigned int returns;
  16. unsigned int exceptions;
  17. unsigned int others;
  18. unsigned int new_files;
  19. unsigned int missed_returns;
  20. unsigned int stack_reallocs;
  21. unsigned int errors;
  22. unsigned int pycalls;
  23. unsigned int start_context_calls;
  24. #endif
  25. } Stats;
  26. #endif /* _COVERAGE_STATS_H */