1
0
Fork 0

increased sleep value in statistics loop from 10 to 500 us

This commit is contained in:
Jan Steemann 2012-08-10 18:15:50 +02:00
parent d36ccb95f9
commit b95b25d621
2 changed files with 5 additions and 14 deletions

View File

@ -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

View File

@ -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);
}
}