ePOST API

rice.pastry.testing
Class ClosestRegrTest

java.lang.Object
  extended by rice.pastry.testing.ClosestRegrTest

public class ClosestRegrTest
extends java.lang.Object

ClosestRegrTest A test suite for the getClosest algorithm. getClosest attempts to choose routing table entries with the closet proximity. Consider this test a PASS if the closest node is there more than 50% of the time. Potentially this test should be run daily and the proximity recorded over time to see if there was a drastic change based on algorithmic change.

Version:
$Id: ClosestRegrTest.java 3038 2006-02-07 10:01:01Z jeffh $
Author:
alan mislove

Field Summary
static int NUM_NODES
           
 
Method Summary
protected  double getAvgNumEntries(java.util.Collection nds)
           
protected  NodeHandle getBootstrap()
          Get pastryNodes.last() to bootstrap with, or return null.
static void main(java.lang.String[] args)
          main
 boolean pass()
           
protected  void run()
          initializes the network and prepares for testing
protected  void test(int i, DirectNodeHandle handle)
          starts the testing process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUM_NODES

public static int NUM_NODES
Method Detail

getBootstrap

protected NodeHandle getBootstrap()
Get pastryNodes.last() to bootstrap with, or return null.


run

protected void run()
initializes the network and prepares for testing


getAvgNumEntries

protected double getAvgNumEntries(java.util.Collection nds)

test

protected void test(int i,
                    DirectNodeHandle handle)
starts the testing process


pass

public boolean pass()

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
main

Throws:
java.io.IOException

ePOST API

Copyright © 2001-2005 - Rice Pastry.