def report_disk_usage(self): # {{{3
    disk_usage = self.__fetchval('PRAGMA page_size') * self.__fetchval('PRAGMA page_count')
    disk_usage += os.stat(self.datastore_file).st_size
    apparent_size = self.__fetchval('SELECT SUM(inodes.size) FROM tree, inodes WHERE tree.inode = inodes.inode')
    self.logger.info("The total apparent size is %s while the databases take up %s (that's %.2f%%).",
        format_size(apparent_size), format_size(disk_usage), float(disk_usage) / (apparent_size / 100))
dataset/ETHPy150Open xolox/dedupfs/dedupfs.py/DedupFS.report_disk_usage/original