mirror of https://gitee.com/bigwinds/arangodb
increased sleep value in statistics loop from 10 to 500 us
This commit is contained in:
parent
d36ccb95f9
commit
b95b25d621
|
@ -2,6 +2,10 @@
|
|||
not released yet
|
||||
----------------
|
||||
|
||||
* increased sleep value in statistics creation loop from 10 to 500 microseconds. This
|
||||
reduces accuracy of statistics values somewhere after the decimal points but saves
|
||||
CPU time.
|
||||
|
||||
* avoid additional sync() calls when writing partial shape data (attribute name data)
|
||||
to disk. sync() will still be called when the shape marker (will be written after
|
||||
the attributes) is written to disk
|
||||
|
|
|
@ -492,22 +492,9 @@ static void StatisticsLoop (void* data) {
|
|||
TRI_UnlockSpin(&StatisticsTimeLock);
|
||||
|
||||
UpdateRequestStatistics(StatisticsTime);
|
||||
|
||||
t = TRI_microtime();
|
||||
|
||||
TRI_LockSpin(&StatisticsTimeLock);
|
||||
StatisticsTime = t;
|
||||
TRI_UnlockSpin(&StatisticsTimeLock);
|
||||
|
||||
UpdateConnectionStatistics(StatisticsTime);
|
||||
|
||||
t = TRI_microtime();
|
||||
|
||||
TRI_LockSpin(&StatisticsTimeLock);
|
||||
StatisticsTime = t;
|
||||
TRI_UnlockSpin(&StatisticsTimeLock);
|
||||
|
||||
usleep(10);
|
||||
usleep(500);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue