mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
separate counter for RARELY -- really only a partial "fix".
(we want these macros to be fast that is why it is as it is)
This commit is contained in:
parent
4dfbeda3db
commit
d11d75e7ef
3
stdafx.h
3
stdafx.h
@ -289,10 +289,11 @@ namespace mongo {
|
||||
#define DEBUGGING if( 0 )
|
||||
|
||||
extern unsigned occasion;
|
||||
extern unsigned occasionR;
|
||||
extern unsigned once;
|
||||
|
||||
#define OCCASIONALLY if( ++occasion % 16 == 0 )
|
||||
#define RARELY if( ++occasion % 128 == 0 )
|
||||
#define RARELY if( ++occasionR % 128 == 0 )
|
||||
#define ONCE if( ++once == 1 )
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
@ -31,6 +31,7 @@ namespace mongo {
|
||||
boost::mutex Logstream::mutex;
|
||||
|
||||
unsigned occasion = 0;
|
||||
unsigned occasionR = 0;
|
||||
unsigned once = 0;
|
||||
bool goingAway = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user