modify PBD::TimingStats to discard the first 1000 recorded values to avoid too much influence from chaotic startup conditions
This commit is contained in:
parent
3f6bf2c451
commit
7bce9899c0
@ -127,9 +127,12 @@ public:
|
||||
|
||||
void update ()
|
||||
{
|
||||
/* throw away the first 1000 values */
|
||||
if (_update_cnt++ > 1000) {
|
||||
Timing::update ();
|
||||
calc ();
|
||||
}
|
||||
}
|
||||
|
||||
void reset ()
|
||||
{
|
||||
@ -140,6 +143,7 @@ public:
|
||||
_avg = 0.;
|
||||
_vm = 0.;
|
||||
_vs = 0.;
|
||||
_update_cnt = 0;
|
||||
}
|
||||
|
||||
bool valid () const {
|
||||
@ -192,6 +196,8 @@ private:
|
||||
double _avg;
|
||||
double _vm;
|
||||
double _vs;
|
||||
uint64_t _update_cnt;
|
||||
};
|
||||
};
|
||||
|
||||
class LIBPBD_API TimingData
|
||||
|
Loading…
Reference in New Issue
Block a user