Performance Measurements: Dijkstra Algorithm (Distributed Tests)

This page uses the module Performance Test Module v6. In that link you can find more information about how to use this module.

1 from numpy import *
2 from rod_lib_perftest6 import PerfTest
3 
4 #Instancia um objeto de testes
5 objTestes = PerfTest()

List of test values

 1 from wen_lib import adj2Graph
 2 import rob_biblio2 as rob
 3 
 4 #Test Graph seen in class
 5 graph01 = array([[inf,3,inf,7,inf,inf,inf,inf,inf],[3,inf,2,inf,1,inf,inf,inf,inf],
 6 [inf,2,inf,inf,inf,11,inf,inf,inf],[7,inf,inf,inf,9,inf,5,inf,inf],
 7 [inf,1,inf,9,inf,4,inf,12,inf],[inf,inf,11,inf,4,inf,inf,inf,10],
 8 [inf,inf,inf,5,inf,inf,inf,2,inf],[inf,inf,inf,inf,12,inf,2,inf,6],[inf,inf,inf,inf,inf,10,inf,6,inf]])
 9 i = 0
10 
11 #mmgraphviz(adj2Graph(graph01),'Test Graph seen in class')
12 
13 #Grafo de teste completo com 50 arestas
14 graph02 = rob.randGraph(50,1,'yes')
15 
16 #Grafo de teste completo com 100 arestas
17 graph03 = rob.randGraph(100,1,'yes')
18 
19 
20 #Initialize an empty test list vector:
21 listT = []
22 test_1 = ['Simple Test Graph', graph01]
23 listT.append(test_1)
24 
25 test_2 = ['Complete(v =50)', graph02]
26 listT.append(test_2)
27 
28 test_3 = ['Complete(v =100)', graph03]
29 listT.append(test_3)
30 
31 graph04 = array([[inf,3,inf,7,inf,inf,inf,inf,inf,inf,inf],[3,inf,2,inf,1,inf,inf,inf,inf,inf,inf],
32 [inf,2,inf,inf,inf,11,inf,inf,inf,inf,inf],[7,inf,inf,inf,9,inf,5,inf,inf,inf,inf],
33 [inf,1,inf,9,inf,4,inf,12,inf,inf,inf],[inf,inf,11,inf,4,inf,inf,inf,10,inf,inf],
34 [inf,inf,inf,5,inf,inf,inf,2,inf,inf,inf],[inf,inf,inf,inf,12,inf,2,inf,6,inf,inf],[inf,inf,inf,inf,inf,10,inf,6,inf,inf,inf],
35 [inf,inf,inf,inf,inf,inf,inf,inf,inf,inf,inf],[inf,inf,inf,inf,inf,inf,inf,inf,inf,inf,inf]])
36 #mmgraphviz(adj2Graph(graph04),'Graph with 3 connected components')
37 test_4 = ['3 connected components', graph04]
38 listT.append(test_4)
39 
40 #Adiciona o vetor de testes ao grafo
41 objTestes.addTests(listT)

Pages to get tests from

A list of namespaces + pages to get the tests results from

Rodrigo

1 #List of namespaces + pages
2 listPaginas = []
3 listPaginas.append(['courseIA368Q1S2012', 'comp_dijkstra_dist_rod'])

Tests Summary

1 #Importa o modulo de testes
2 from comp_dijkstra_dist import objTestes
3 
4 #Mostra o resultado
5 objTestes.showResults(listPaginas)
/usr/local/lib/python2.6/dist-packages/scikits/__init__.py:1: UserWarning: Module dateutil was already imported from /usr/local/lib/python2.6/dist-packages/matplotlib-1.1.0-py2.6-linux-x86_64.egg/dateutil/__init__.pyc, but /usr/lib/pymodules/python2.6 is being added to sys.path
__import__('pkg_resources').declare_namespace(__name__)
Autor Funcao Simple Test Graph   Complete(v =50)   Complete(v =100)   3 connected components  
Rodrigo rddij 0.451 ms 41.0 1.679 ms 452.360689515 3.366 ms 434.728355307 0.327 ms inf