#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
from host_profiler.bench import bench
#from host_profiler.bench import benchproc

if __name__ == '__main__':
    p = []
    f = ''
    check = False
    check_f = False
    for v in sys.argv:
        if check:
            if not v.startswith('-'):
                p.append(v)
            else:
                check = False
        if check_f:
            f = v
            check_f = False
        if v == '-p':
            a = True
        if v == '-f':
            check_f = True
    if f == '':
        print('error usage: runbench -f result_folder ')

    if len(p) == 0:
        bench(f)
    else:
        for i in  p:
            benchproc(f, i)

