def cmd_stats(self, conn):
        with self.lib.transaction() as tx:
            statement = 'SELECT COUNT(DISTINCT artist), ' \
                        'COUNT(DISTINCT album), ' \
                        'COUNT(id), ' \
                        'SUM(length) ' \
                        'FROM items'
            artists, albums, songs, totaltime = tx.query(statement)[0]

        yield (
            u'artists: ' + unicode(artists),
            u'albums: ' + unicode(albums),
            u'songs: ' + unicode(songs),
            u'uptime: ' + unicode(int(time.time() - self.startup_time)),
            u'playtime: ' + u'0',  # Missing.
            u'db_playtime: ' + unicode(int(totaltime)),
            u'db_update: ' + unicode(int(self.updated_time)),
        )

    # Searching.
Sends some statistics about the library.
dataset/ETHPy150Open beetbox/beets/beetsplug/bpd/__init__.py/Server.cmd_stats