ePOST API

rice.pastry.testing
Class MemoryTest

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

public class MemoryTest
extends java.lang.Object

The purpose of this test is to verify that FreePastry is properly shutting down, without having to destroy the JVM.

Author:
Jeff Hoye

Constructor Summary
MemoryTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static void testDirect()
          Same thing, but with direct
static void testMultiEnvironment()
          Same test as testOneEnvironment, but also creates/destroys the environment for each node.
static void testOneEnvironment()
          The idea is to keep a ring of about 10 nodes alive, but one by one recycle the nodes out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryTest

public MemoryTest()
Method Detail

testOneEnvironment

public static void testOneEnvironment()
                               throws java.lang.Exception
The idea is to keep a ring of about 10 nodes alive, but one by one recycle the nodes out. In the end, creating a whole lot of nodes, to see if they are being properly cleaned up. TODO: make this return a boolean: Record the memory at start (M1), then after creating the ringSize*2 nodes (M2) (M2-M1/ringSize) is the approx memory for 1 node. M3 = (M2-M1) which is basically the amount of memory that our ring of 10 should take up. at the end of the test, record M4. if M4 > (M1+2*M3) then we probably have a leak, fail. TODO: test this with other environment settings

Throws:
java.lang.Exception

testMultiEnvironment

public static void testMultiEnvironment()
Same test as testOneEnvironment, but also creates/destroys the environment for each node.


testDirect

public static void testDirect()
Same thing, but with direct


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

ePOST API

Copyright © 2001-2005 - Rice Pastry.