def METHOD_NAME(self):
    perfstat = self.params.get('perfstat', default='')
    if perfstat:
        perfstat = 'perf stat ' + perfstat
    pcpu = self.params.get('pcpu', default='0')
    ccpu = self.params.get('ccpu', default='1')
    random_seed = self.params.get('random_seed', default=6407741)
    runtime = self.params.get('runtime', default=5)
    verbose = self.params.get('verbose', default=False)
    precompute_random = self.params.get('precompute_random', default=False)
    intermediate_stats = self.params.get(
        'intermediate_stats', default=False)
    cache_size = self.params.get('cache_size')
    if not cache_size:
        iteration_length = self.params.get(
            'iteration_length', default=1024)
        args = '-p %s -c %s -r %s -l %s -t %s' % (pcpu, ccpu, random_seed,
                                                  iteration_length, runtime)
    else:
        args = '-p %s -c %s -r %s -s %s -t %s' % (pcpu, ccpu, random_seed,
                                                  cache_size, runtime)
    if verbose:
        args += ' --verbose'
    if precompute_random:
        args += ' --precompute-random'
    if intermediate_stats:
        args += ' --intermediate-stats'
    cmd = '%s %s/producer_consumer %s' % (perfstat, self.sourcedir, args)
    res = process.run(cmd, ignore_status=True, shell=True)
    if res.exit_status:
        self.fail("The test failed. Failed command is %s" % cmd)
    lines = res.stdout.decode().splitlines()
    for line in lines:
        if line.startswith('Consumer(0) :'):
            print(line)
            pattern = re.compile(r":\s(.*?) iterations")
            iteration = pattern.findall(line)[0]
            pattern = re.compile(r"time/iteration: (.*?) ns")
            time_iter = pattern.findall(line)[0]
            pattern = re.compile(r"time/access:  (.*?) ns")
            time_acc = pattern.findall(line)[0]
            json_object = json.dumps({'iterations': iteration,
                                      'iter_time': time_iter,
                                      'access_time': time_acc})
            break
    logfile = os.path.join(self.logdir, "time_log.json")
    with open(logfile, "w") as outfile:
        outfile.write(json_object)