def benchmark(edgeList): 
    iterator = GraphIterator(100)
    numGraphTypes = iterator.getNumGraphs() 
    numMeasures = 6 
    timeArray = numpy.zeros((len(edgeList), numGraphTypes, numMeasures)) 
    i = 0 
    
    nxGraph = networkx.Graph()
    
    for numVertices, edges in edgeList: 
        print("Timing graphs of size " + str(numVertices) + " with " + str(edges.shape[0]) + " edges")
        
        iterator = GraphIterator(numVertices)
        j = 0 
        
        for graph in iterator:
            measureInd = 0            
            
            print("Add edges benchmark on " + str(graph))    
            startTime = time.clock()
            for m in range(10): 
                graph.addEdges(edges)      
            timeArray[i, j, measureInd] =  time.clock() - startTime
            measureInd += 1 
            
            vertexIds = graph.getAllVertexIds()            
            
            print("Neighbours benchmark on " + str(graph))    
            startTime = time.clock()
            for m in range(100): 
                for k in range(50): 
                    graph.neighbours(vertexIds[k])      
            timeArray[i, j, measureInd] =  time.clock() - startTime
            measureInd += 1
            
            print("Depth first search benchmark on " + str(graph))    
            startTime = time.clock()
            for k in range(5): 
                graph.depthFirstSearch(vertexIds[k])      
            timeArray[i, j, measureInd] =  time.clock() - startTime
            measureInd += 1
            
            print("Breadth first search benchmark on " + str(graph))    
            startTime = time.clock()
            for k in range(5): 
                graph.breadthFirstSearch(vertexIds[k])      
            timeArray[i, j, measureInd] =  startTime - time.clock()   
            measureInd += 1
            
            print("Find components benchmark on " + str(graph))    
            startTime = time.clock()
            graph.findConnectedComponents()      
            timeArray[i, j, measureInd] =  time.clock() - startTime  
            measureInd += 1             
            
            print("Degree sequence benchmark on " + str(graph))    
            startTime = time.clock()
            for k in range(100): 
                graph.degreeSequence()      
            timeArray[i, j, measureInd] =  time.clock() - startTime  
            measureInd += 1              
            
            j += 1
            
        i +=1 
            
    return timeArray
dataset/ETHPy150Open charanpald/APGL/apgl/graph/Benchmark.py/benchmark/swapped operands of `-`