On this page
db.collection.dataSize()
db.collection.dataSize( )-
Returns: The size in bytes of the collection. Data compressiondoes not affect this value.This method provides a wrapper around the
sizeoutput of thecollStats(i.e.db.collection.stats()) command.