mongodb/mongo-csharp-driver — pull request #144 by einaregilsson (2012-12-10 20:38:58+00:00)
Title: Correctly serialize lock statistics in system.profile.

Problems:

1. The SystemProfileInfoSerializer used the name "lockStatMillis" for the lock statistics key name. At least in MongoDB 2.2 the correct name is "lockStats"

2. The SystemProfileLockStatisticsSerializer used the names "timeAcquiring" and "timeLocked" where the right names are "timeAcquiringMicros" and "timeLockedMicros".

3. The timespan units used were milliseconds, where the correct units are microseconds. Added the option MicroSeconds to the TimeSpanSerializer and set the SystemProfileReadWriteLockStatisticsSerializer to use Microseconds.

4. NOT FIXED: The TimeSpanUnits.Nanoseconds is wrong. 1 millisecond is not 1000 nanoseconds, its 1000000 nanoseconds. This option should probably be removed since TimeSpan doesn't have nanosecond precision (most accurate precision is ticks, where 10000 ticks are one millisecond).