示例#1
0
                if col_xref is None:
                    col_xref = { }
                    for i in xrange(len(row)):
                        col_xref[row[i]] = i
                    continue
                start = int(row[col_xref['START']])
                duration = int(row[col_xref['STOP']]) - start
                assert duration >= 0
                if start < globalStart:
                    continue
                evictions.append((start-globalStart, duration))
            ## FOR
            data["evictions"] = sorted(evictions, key=lambda x: x[0])
        ## WITH
    
        processedData[benchmark] = data
    ## FOR
    
    ## ----------------------------------------------
    ## GENERATE GRAPHS
    ## ----------------------------------------------
    for benchmark,data in processedData.iteritems():
        fig = createThroughputGraph(benchmark, data)
        graphutil.saveGraph(fig, "/home/michaelg/data-hstore/ycsb/ycsb-T500-NoLoop-full-block/evictions-throughput-%s.pdf" % benchmark, height=OPT_GRAPH_HEIGHT)
        
        fig = createMemoryGraph(benchmark, data)
        graphutil.saveGraph(fig, "/home/michaelg/data-hstore/ycsb/ycsb-T500-NoLoop-full-block/evictions-memory-%s.pdf" % benchmark, height=OPT_GRAPH_HEIGHT)
    ## FOR

## MAIN
示例#2
0
            for row in reader:
                if col_xref is None:
                    col_xref = { }
                    for i in xrange(len(row)):
                        col_xref[row[i]] = i
                    continue
                start = int(row[col_xref['START']])
                duration = int(row[col_xref['STOP']]) - start
                assert duration >= 0
                #assert start >= globalStart
                evictions.append((start-globalStart, duration))
            ## FOR
            data["evictions"] = sorted(evictions, key=lambda x: x[0])
        ## WITH
    
        processedData[benchmark] = data
    ## FOR
    
    ## ----------------------------------------------
    ## GENERATE GRAPHS
    ## ----------------------------------------------
    for benchmark,data in processedData.iteritems():
        fig = createThroughputGraph(benchmark, data)
        graphutil.saveGraph(fig, "evictions-throughput-%s.pdf" % benchmark, height=OPT_GRAPH_HEIGHT)
        
        fig = createMemoryGraph(benchmark, data)
        graphutil.saveGraph(fig, "evictions-memory-%s.pdf" % benchmark, height=OPT_GRAPH_HEIGHT)
    ## FOR

## MAIN
                if col_xref is None:
                    col_xref = { }
                    for i in xrange(len(row)):
                        col_xref[row[i]] = i
                    continue
                start = int(row[col_xref['START']])
                duration = int(row[col_xref['STOP']]) - start
                assert duration >= 0
                if start < globalStart:
                    continue
                evictions.append((start-globalStart, duration))
            ## FOR
            data["evictions"] = sorted(evictions, key=lambda x: x[0])
        ## WITH
    
        processedData[benchmark] = data
    ## FOR
    
    ## ----------------------------------------------
    ## GENERATE GRAPHS
    ## ----------------------------------------------
    for benchmark,data in processedData.iteritems():
        fig = createThroughputGraph(benchmark, data)
        graphutil.saveGraph(fig, "/home/michaelg/data-hstore/plots/tpcc-single-host/tpcc-evictions-throughput-%s.pdf" % benchmark, height=OPT_GRAPH_HEIGHT)
        
        fig = createMemoryGraph(benchmark, data)
        graphutil.saveGraph(fig, "/home/michaelg/data-hstore/plots/tpcc-single-host/tpcc-evictions-memory-%s.pdf" % benchmark, height=OPT_GRAPH_HEIGHT)
    ## FOR

## MAIN
示例#4
0
    
    ## WORKLOAD SKEW GRAPHS
    for benchmark in hstoreData.keys():
        memorySizes = set(map(lambda x: int(x["mem"]), hstoreData[benchmark]))
        readPcts = set(map(lambda x: int(x["read_pct"]), hstoreData[benchmark]))
        readLabels = dict(map(lambda x: (datautil.OPT_HSTORE_TAGS[x], x), datautil.OPT_HSTORE_TAGS.keys()))
        
        for mem in memorySizes:
            for read_pct in readPcts:
#                fig = createWorkloadSkewGraphs(benchmark, mem, read_pct,
#                                               hstoreData[benchmark],
#                                               mysqlData[benchmark],
#                                               memcachedData[benchmark])
                fig = createWorkloadSkewGraphs(benchmark, mem, read_pct, noAntiCache[benchmark], hstoreData[benchmark], hstoreDataApprox[benchmark], mysqlData[benchmark], memcachedData[benchmark])
                fileName = "skew-%s-%dx-%s.pdf" % (benchmark, mem, readLabels[read_pct])
                graphutil.saveGraph(fig, fileName, height=OPT_GRAPH_HEIGHT)
                #break
            ## FOR
            #break
        ## FOR
    ## FOR

	colMap, indexTreeData = datautil.getCSVData(OPT_DATA_INDEX_TREE) 
	colMap, indexHashData = datautil.getCSVData(OPT_DATA_INDEX_HASH) 
	fig = createIndexGraph(colMap, indexHashData, indexTreeData)
	graphutil.saveGraph(fig, "index.pdf")

## LRU graph
    colMap, hstoreNoAnticacheData = datautil.getCSVData(OPT_DATA_LRU_NONE)
    colMap, hstoreSingleListData = datautil.getCSVData(OPT_DATA_LRU_SINGLE)
    colMap, hstoreDoubleListData = datautil.getCSVData(OPT_DATA_LRU_DOUBLE)
示例#5
0
        for mem in memorySizes:
            for read_pct in readPcts:
                #                fig = createWorkloadSkewGraphs(benchmark, mem, read_pct,
                #                                               hstoreData[benchmark],
                #                                               mysqlData[benchmark],
                #                                               memcachedData[benchmark])
                fig = createWorkloadSkewGraphs(benchmark, mem, read_pct,
                                               noAntiCache[benchmark],
                                               hstoreData[benchmark],
                                               hstoreDataApprox[benchmark],
                                               mysqlData[benchmark],
                                               memcachedData[benchmark])
                fileName = "skew-%s-%dx-%s.pdf" % (benchmark, mem,
                                                   readLabels[read_pct])
                graphutil.saveGraph(fig, fileName, height=OPT_GRAPH_HEIGHT)
                #break
            ## FOR
            #break
        ## FOR
    ## FOR

        colMap, indexTreeData = datautil.getCSVData(OPT_DATA_INDEX_TREE)
        colMap, indexHashData = datautil.getCSVData(OPT_DATA_INDEX_HASH)
        fig = createIndexGraph(colMap, indexHashData, indexTreeData)
        graphutil.saveGraph(fig, "index.pdf")

## LRU graph
    colMap, hstoreNoAnticacheData = datautil.getCSVData(OPT_DATA_LRU_NONE)
    colMap, hstoreSingleListData = datautil.getCSVData(OPT_DATA_LRU_SINGLE)
    colMap, hstoreDoubleListData = datautil.getCSVData(OPT_DATA_LRU_DOUBLE)
    y_max = None

    linecolors = [
        OPT_COLORS
    ] + [[colorConverter.to_rgba(rgb, OPT_LINE_ALPHA)
          for rgb in OPT_COLORS]] * 2
    markersizes = [OPT_MARKER_SIZE] + [None] * 2

    for benchmark in hstoreData.keys():
        for read_pct in readPcts:
            y_max = None
            for memIdx in xrange(len(memorySizes)):
                mem = map(int, reversed(memorySizes[:memIdx + 1]))
                fig, y_max = createThroughputGraph(
                    benchmark,
                    mem,
                    read_pct,
                    hstoreData[benchmark],
                    mysqlData[benchmark],
                    memcachedData[benchmark],
                    y_max=y_max,
                    linecolors=linecolors,
                    markersizes=markersizes,
                )
                fileName = "throughput-%s-%s-%02d.pdf" % (
                    benchmark, readLabels[read_pct], memIdx)
                graphutil.saveGraph(fig, fileName, height=OPT_GRAPH_HEIGHT)
        ## FOR
    ## FOR

## MAIN
示例#7
0
    #print "="*150
    
    memorySizes = [ 1, 2 ]
    readPcts = [ 90 ]
    readLabels = dict(map(lambda x: (datautil.OPT_HSTORE_TAGS[x], x), datautil.OPT_HSTORE_TAGS.keys()))
    y_max = None

    linecolors = [OPT_COLORS] + [[colorConverter.to_rgba(rgb, OPT_LINE_ALPHA) for rgb in OPT_COLORS]]*2
    markersizes = [OPT_MARKER_SIZE] + [None]*2
    
    for benchmark in hstoreData.keys():
        for read_pct in readPcts:
            y_max = None
            for memIdx in xrange(len(memorySizes)):
                #mem = map(int, reversed(memorySizes[:memIdx+1]))
                mem = map(int, [ memorySizes[memIdx] ])
                fig,y_max = createThroughputGraph(benchmark, mem, read_pct,
                                                  hstoreData[benchmark],
                                                  mysqlData[benchmark],
                                                  memcachedData[benchmark],
                                                  y_max=y_max,
                                                  linecolors=linecolors,
                                                  markersizes=markersizes,
                )
                fileName = "throughput-%s-%s-%02d.pdf" % (benchmark, readLabels[read_pct], memIdx)
                #graphutil.saveGraph(fig, fileName, height=OPT_GRAPH_HEIGHT)
                graphutil.saveGraph(fig, fileName, height=300)
        ## FOR
    ## FOR

## MAIN
示例#8
0
    memcachedData = datautil.loadMySQLData(memcached=True)
    #pprint(memcachedData)
    #print "="*150
    
    memorySizes = [ 1, 2 ]
    readPcts = [ 90 ]
    readLabels = dict(map(lambda x: (datautil.OPT_HSTORE_TAGS[x], x), datautil.OPT_HSTORE_TAGS.keys()))
    y_max = None

    linecolors = [OPT_COLORS] + [[colorConverter.to_rgba(rgb, OPT_LINE_ALPHA) for rgb in OPT_COLORS]]*2
    markersizes = [OPT_MARKER_SIZE] + [None]*2
    
    for benchmark in hstoreData.keys():
        for read_pct in readPcts:
            y_max = None
            for memIdx in xrange(len(memorySizes)):
                mem = map(int, reversed(memorySizes[:memIdx+1]))
                fig,y_max = createThroughputGraph(benchmark, mem, read_pct,
                                                  hstoreData[benchmark],
                                                  mysqlData[benchmark],
                                                  memcachedData[benchmark],
                                                  y_max=y_max,
                                                  linecolors=linecolors,
                                                  markersizes=markersizes,
                )
                fileName = "throughput-%s-%s-%02d.pdf" % (benchmark, readLabels[read_pct], memIdx)
                graphutil.saveGraph(fig, fileName, height=OPT_GRAPH_HEIGHT)
        ## FOR
    ## FOR

## MAIN