/[fenfire]/fenfire/org/fenfire/swamp/bench/graph.py
ViewVC logotype

Diff of /fenfire/org/fenfire/swamp/bench/graph.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Thu Apr 24 12:05:30 2003 UTC revision 1.2 by tjl, Thu May 8 13:22:06 2003 UTC
# Line 1  Line 1 
1  # (c) Tuomas J. Lukka  # (c) Tuomas J. Lukka
2    
3  import org  import org
4  swamp = org.fenfire.swamp  import java
5    from org import fenfire as ff
6    
7    
8  tim = java.lang.System.currentTimeMillis  tim = java.lang.System.currentTimeMillis
9    
10  def bench(nrounds, nnodes = 100):  def bench(nrounds, nnodes = 100):
11      ro = swamp.bench.RDFOps(nnodes + 50)      ro = ff.swamp.bench.RDFOps(nnodes + 50)
12      ro.graph = HashGraph()      ro.graph = ff.swamp.impl.HashGraph()
13    
14      ro.nrounds = nrounds * nnodes      ro.nrounds = nrounds * nnodes
15      ro.circleSize = nnodes      ro.circleSize = nnodes
16    
17      ro.traverseCircle_prepare()      ro.traverseCircle_prepare()
18    
19      t0 = tim      t0 = tim()
20      ro.traverseCircle_find1()      ro.traverseCircle_find1()
21      t1 = tim      t1 = tim()
22    
23        return ((t1-t0) / 1000.0, "X")
24    
25    args = {
26    "nnodes": (10,100,1000),
27    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26