Right now the size field of db.oplog.$main.stats() is always 0. This makes it impossible to tell how much data is there before it wraps, so you can't know if its large enough.
> db.oplog.$main.stats()
{
"ns" : "local.oplog.$main",
"count" : 37,
"size" : 0,
"storageSize" : 990000128,
"numExtents" : 1,
"nindexes" : 0,
"lastExtentSize" : 990000128,
"paddingFactor" : 1,
"flags" : 0,
"totalIndexSize" : 0,
"indexSizes" : {
},
"capped" : 1,
"max" : 2147483647,
"ok" : 1
}
Also, the timeDiff and timeDiffHours fields of db.getReplicationInfo() should probably use (time * (storageSize / size)) to have more accurate results early on. Example of the issue:
> db.getReplicationInfo()
{
"logSizeMB" : 990,
"timeDiff" : 224,
"timeDiffHours" : 0.06,
"tFirst" : "Thu May 06 2010 10:14:17 GMT-0400 (EDT)",
"tLast" : "Thu May 06 2010 10:18:01 GMT-0400 (EDT)",
"now" : "Thu May 06 2010 10:18:11 GMT-0400 (EDT)"
}