def do_memory_job(bench_all, current_job, log_dir, total_runtime):
    bench = dict(bench_all)

    if parse_job_config(bench, current_job, HM.MEMORY, log_dir) is True:
        nb_loops = 0
        hosts_series = compute_nb_hosts_series(bench)
        for nb_hosts in hosts_series:
            nb_loops = nb_loops + 1
            iter_bench = dict(bench)
            iter_bench['cores'] = get_default_value(current_job, 'cores', 1)
            iter_bench['block-size'] = get_default_value(current_job, 'block-size', "128M")
            iter_bench['mode'] = get_default_value(current_job, 'mode', HM.FORKED)
            iter_bench['nb-hosts'] = nb_hosts
            total_runtime += iter_bench['runtime']

            iter_bench['hosts-list'] = get_hosts_list_from_affinity(iter_bench)

            if (iter_bench['nb-hosts'] < len(iter_bench['hosts-list'])):
                HP.logger.error("MEMORY: %d hosts expected while affinity only provides %d hosts available" % (iter_bench['nb-hosts'], len(iter_bench['hosts-list'])))
                HP.logger.error("MEMORY: Canceling test %d / %d" % ((iter_bench['nb-hosts'], iter_bench['max_hosts'])))
                continue

            HP.logger.info("MEMORY: Waiting bench @%s %d / %d"
                           " to finish on %d hosts (step = %d): should take"
                           " %d seconds" % (iter_bench['block-size'], nb_loops, len(hosts_series),
                                            iter_bench['nb-hosts'], iter_bench['step-hosts'],
                                            iter_bench['runtime']))

            metrics_log_dir = prepare_metrics(log_dir, iter_bench, HM.MEMORY)

            init_jitter()

            start_memory_bench(iter_bench)

            time.sleep(bench['runtime'])

            while (get_host_list(MEMORY_RUN).keys()):
                time.sleep(1)

            disable_jitter()

            compute_metrics(metrics_log_dir, iter_bench, HM.MEMORY)
    else:
        HP.logger.error("MEMORY: Canceling Test")
dataset/ETHPy150Open redhat-cip/edeploy/src/health-server.py/do_memory_job/swapped operands of `<`