コード例 #1
0
        # if this path is for failover_ram and has no chils, e.g.
        # '/home/nick/buffer/Aerospike/Aerospike/failover_ram/async/50_percent_max_throughput'
        if 'failover' in path[0] and len(path[1]) == 0:
            paths.append(path[0])
    # paths = filter(lambda s: "Aerospike26" in s, paths)
    # now the list of dirs formed, generate the pictures
    h = hpy()
    collect = []
    for path in paths:
        if path == '/home/nick/buffer/Aerospike/Aerospike26NewClients/failover_ram/sync/50_percent_max_throughput':
            print('here')
        os.chdir(path)
        sys.argv = ["", "series.txt"]
        if True:
            try:
                timeseries_merge.merge(collect)
                name = timeseries_draw.draw()
                # move this new wonderful file to XGraphs
                src_name = timeseries_draw.file_name_with_ext(name)
                tgt_name = postfix + src_name
                os.rename(src_name, tgt_name)
            except:
                print(sys.exc_info()[0], file=sys.stderr)
        else:
            update_collect(collect)
        print("done with %s" % path)
        # print("memory = %s" % h.heap())

    keyz_ram = filter(lambda s: len(s) > 0, keyz_ram_str.split("\n"))
    with open("/home/nick/buffer/collect.txt", "w") as f:
        cw = csv.writer(f, dialect='excel-tab')
コード例 #2
0
ファイル: timeseries_batch.py プロジェクト: EnigmaCurry/YCSB
        # if this path is for failover_ram and has no chils, e.g.
        # '/home/nick/buffer/Aerospike/Aerospike/failover_ram/async/50_percent_max_throughput'
        if 'failover' in path[0] and len(path[1]) == 0:
            paths.append(path[0])
    # paths = filter(lambda s: "Aerospike26" in s, paths)
    # now the list of dirs formed, generate the pictures
    h = hpy()
    collect = []
    for path in paths:
        if path == '/home/nick/buffer/Aerospike/Aerospike26NewClients/failover_ram/sync/50_percent_max_throughput':
            print('here')
        os.chdir(path)
        sys.argv = ["", "series.txt"]
        if True:
            try:
                timeseries_merge.merge(collect)
                name = timeseries_draw.draw()
                # move this new wonderful file to XGraphs
                src_name = timeseries_draw.file_name_with_ext(name)
                tgt_name = postfix + src_name
                os.rename(src_name, tgt_name)
            except:
                print(sys.exc_info()[0], file=sys.stderr)
        else:
            update_collect(collect)
        print("done with %s" % path)
        # print("memory = %s" % h.heap())

    keyz_ram = filter(lambda s: len(s) > 0, keyz_ram_str.split("\n"))
    with open("/home/nick/buffer/collect.txt", "w") as f:
        cw = csv.writer(f, dialect='excel-tab')
コード例 #3
0
ファイル: timeseries_batch.py プロジェクト: bayoukingpin/ycsb
import os
import sys
import timeseries_draw
import timeseries_merge

if __name__ == "__main__":
    # this script goes over all dirs and subdirs under
    # prefix and selects all paths that do 'failover_ram'
    # tests. For each path under the condition the graph is built
    prefix = "/home/nick/buffer/Aerospike"
    paths = []
    for path in os.walk(prefix):
        # if this path is for failover_ram and has no chils, e.g.
        # '/home/nick/buffer/Aerospike/Aerospike/failover_ram/async/50_percent_max_throughput'
        if 'failover' in path[0] and len(path[1]) == 0:
            paths.append(path[0])
    # now the list of dirs formed, generate the pictures
    for path in paths:
        os.chdir(path)
        sys.argv = ["", "series.txt"]
        timeseries_merge.merge()
        timeseries_draw.draw()
        print "done with %s" % path

    # ts_merge = "/home/nick/ycsb/bin/timeseries_merge.py"
    # ts_draw  = "/home/nick/ycsb/bin/timeseries_draw.py"
    # os.system("cd %s; %s | %s" % (path, ts_merge, ts_draw))
    print "all walking done!"