summaryrefslogtreecommitdiff
path: root/openpicc/application/performance.h
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-03-10 00:53:54 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-03-10 00:53:54 +0000
commit9cde1dd08282554001b9619191a9d170de913dc5 (patch)
tree792ee4be510894911502830be2f870a9fbf3b4ae /openpicc/application/performance.h
parentbea54255a3217229764cd35aca4387ac76531692 (diff)
Add performance measurement code
Measure miller decoder performance git-svn-id: https://svn.openpcd.org:2342/trunk@447 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/performance.h')
-rw-r--r--openpicc/application/performance.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/openpicc/application/performance.h b/openpicc/application/performance.h
new file mode 100644
index 0000000..fddd9d9
--- /dev/null
+++ b/openpicc/application/performance.h
@@ -0,0 +1,25 @@
+#ifndef PERFORMANCE_H_
+#define PERFORMANCE_H_
+
+extern void performance_start(void);
+extern void performance_init(void);
+
+typedef struct {
+ u_int32_t high; /* 32 bit count of overruns */
+ u_int32_t low; /* 16 bit from T/C running at MCK/2 */
+} perf_time_t;
+
+extern perf_time_t performance_get(void);
+extern perf_time_t performance_stop(void);
+
+extern void performance_print(perf_time_t time);
+
+struct performance_checkpoint {
+ perf_time_t time;
+ const char * description;
+};
+
+extern void performance_set_checkpoint(const char * const description);
+extern void performance_stop_report(void);
+
+#endif /*PERFORMANCE_H_*/
personal git repositories of Harald Welte. Your mileage may vary