Mercurial > hg > svcore
comparison base/Profiler.h @ 408:115f60df1e4d
* Speed up spectrogram painting by releasing mutex in FFTDataServer
while calculating data prior to writing it, and by adding whole-column
value query methods to FFT objects
* Add paint cache to Thumbwheel -- repaints of this widget were slowing
down the whole spectrogram repaint
* More uses of MutexLocker (named and with debug) and more profile
points
* Make startup much quicker some of the time, with OSC server in place
author | Chris Cannam |
---|---|
date | Thu, 08 May 2008 14:46:22 +0000 |
parents | 91fdc752e540 |
children | 5a13b76cd034 |
comparison
equal
deleted
inserted
replaced
407:88ad01799040 | 408:115f60df1e4d |
---|---|
96 */ | 96 */ |
97 Profiler(const char *name, bool showOnDestruct = false); | 97 Profiler(const char *name, bool showOnDestruct = false); |
98 ~Profiler(); | 98 ~Profiler(); |
99 | 99 |
100 void update() const; | 100 void update() const; |
101 void end(); // same action as dtor | |
101 | 102 |
102 protected: | 103 protected: |
103 const char* m_c; | 104 const char* m_c; |
104 clock_t m_startCPU; | 105 clock_t m_startCPU; |
105 RealTime m_startTime; | 106 RealTime m_startTime; |
106 bool m_showOnDestruct; | 107 bool m_showOnDestruct; |
108 bool m_ended; | |
107 }; | 109 }; |
108 | 110 |
109 #else | 111 #else |
110 | 112 |
111 class Profiler | 113 class Profiler |
112 { | 114 { |
113 public: | 115 public: |
114 Profiler(const char *, bool) { } | 116 Profiler(const char *, bool = false) { } |
115 ~Profiler() { } | 117 ~Profiler() { } |
116 | 118 |
117 void update() { } | 119 void update() const { } |
120 void end() { } | |
118 }; | 121 }; |
119 | 122 |
120 #endif | 123 #endif |
121 | 124 |
122 #endif | 125 #endif |