@classmethod<EOL><INDENT>def metric(cls, name, count, elapsed):<DEDENT>
if name is None:<EOL><INDENT>warnings.warn("<STR_LIT>", stacklevel=<NUM_LIT:3>)<EOL>return<EOL><DEDENT>with cls.lock:<EOL><INDENT>if not cls.instances:<EOL><INDENT>shutil.rmtree(cls.outdir, ignore_errors=True)<EOL>os.makedirs(cls.outdir)<EOL>if cls.dump_atexit: atexit.register(cls.dump)<EOL><DEDENT>try:<EOL><INDENT>self = cls.instances[name]<EOL><DEDENT>except KeyError:<EOL><INDENT>self = cls.instances[name] = cls(name)<EOL><DEDENT>self.writer.writerow((count, "<STR_LIT>"%elapsed))<EOL><DEDENT>
A metric function that writes multiple CSV files

        :arg str name: name of the metric
        :arg int count: number of items
        :arg float elapsed: time in seconds