Examples of compareInventories()


Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

      Map inventory2 = jvmti.produceInventory();
     
      log.info("inventory1.size=" + inventory1.size());
      log.info("inventory2.size=" + inventory2.size());
     
      assertTrue("Test produced unexpected objects",jvmti.compareInventories(System.out, inventory1,inventory2,null, null, new InventoryDataPoint[] {new InventoryDataPoint(Object.class,10)}));
           
      conn.close();
     
      conn = null;
     
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

      Map inventory2 = jvmti.produceInventory();
     
      log.info("inventory1.size=" + inventory1.size());
      log.info("inventory2.size=" + inventory2.size());
     
      assertTrue("Test produced unexpected objects",jvmti.compareInventories(System.out, inventory1,inventory2,null, null, new InventoryDataPoint[] {new InventoryDataPoint(Object.class,10)}));
     
      conn.close();
     
      conn = null;
     
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

               }
            }

         }

         assertTrue("Test produced unexpected objects", jvmti.compareInventories(System.out,
            inventory1, inventory2, null, null,
            new InventoryDataPoint[]{new InventoryDataPoint(Object.class, 10)}));

      }
      finally
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

      Map inventory2 = jvmti.produceInventory();

      validateInstances(jvmti, FailoverValve2.class, inventory2, 1);
      validateInstances(jvmti, ClientConsumer.class, inventory2, 1);

      assertTrue("Test produced unexpected objects", jvmti.compareInventories(System.out,
          inventory1, inventory2, null, null,
          new InventoryDataPoint[]{new InventoryDataPoint(java.lang.ref.SoftReference.class, 10),
                                   new InventoryDataPoint(jvmti.getClassByName("java.io.ObjectStreamClass$WeakClassKey"), 100),
             new InventoryDataPoint(jvmti.getClassByName("java.util.concurrent.ConcurrentHashMap$HashEntry"), 100),
             new InventoryDataPoint(jvmti.getClassByName("java.util.WeakHashMap$Entry"), 500)
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

  {
    JVMTIInterface jvmti = new JVMTIInterface(); // The JVMTIWrapper used to produce inventories
   
    Map map = jvmti.produceInventory();
    Map map2 = jvmti.produceInventory();
    assertTrue( jvmti.compareInventories(System.out,map,map2,null,null,null));
   
  }
 
  public void testProduceInventory() throws Exception
  {
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

   
    JVMTIInterface jvmti = new JVMTIInterface(); // The JVMTIWrapper used to produce inventories
   
    Map map = jvmti.produceInventory();
    Map map2 = jvmti.produceInventory();
    jvmti.compareInventories(System.out,map,map2,null,null,null);
    System.out.println("size=" + map.size());
    map=null;
    map2=null;

    TestClass keepr = new TestClass(); // at least one instance, so point2 won't be null
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

    InventoryDataPoint point1 = (InventoryDataPoint)secondMap.get(TestClass.class);
    InventoryDataPoint point2 = (InventoryDataPoint)firstMap.get(TestClass.class);
   
    assertEquals(1000,point1.getInstances()-point2.getInstances()); // you can manually compare it
   
    assertTrue(jvmti.compareInventories(System.out,firstMap,secondMap,new Class[]{WeakHashMap.class},new String[]{"[Ljava.util.WeakHashMap$Entry;","java.lang.ref"}, new InventoryDataPoint[]{new InventoryDataPoint(TestClass.class,2000)}));
    assertFalse(jvmti.compareInventories(System.out,firstMap,secondMap,new Class[]{WeakHashMap.class},new String[]{"[Ljava.util.WeakHashMap$Entry;","java.lang.ref"}, new InventoryDataPoint[]{new InventoryDataPoint(TestClass.class,100)}));

  }
 
  public void testExploreObject() throws Exception
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

    InventoryDataPoint point2 = (InventoryDataPoint)firstMap.get(TestClass.class);
   
    assertEquals(1000,point1.getInstances()-point2.getInstances()); // you can manually compare it
   
    assertTrue(jvmti.compareInventories(System.out,firstMap,secondMap,new Class[]{WeakHashMap.class},new String[]{"[Ljava.util.WeakHashMap$Entry;","java.lang.ref"}, new InventoryDataPoint[]{new InventoryDataPoint(TestClass.class,2000)}));
    assertFalse(jvmti.compareInventories(System.out,firstMap,secondMap,new Class[]{WeakHashMap.class},new String[]{"[Ljava.util.WeakHashMap$Entry;","java.lang.ref"}, new InventoryDataPoint[]{new InventoryDataPoint(TestClass.class,100)}));

  }
 
  public void testExploreObject() throws Exception
  {
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

      Map inventory2 = jvmti.produceInventory();
     
      log.info("inventory1.size=" + inventory1.size());
      log.info("inventory2.size=" + inventory2.size());
     
      assertTrue("Test produced unexpected objects",jvmti.compareInventories(System.out, inventory1,inventory2,null, null, new InventoryDataPoint[] {new InventoryDataPoint(Object.class,10)}));
           
      conn.close();
     
      conn = null;
     
View Full Code Here

Examples of org.jboss.profiler.jvmti.JVMTIInterface.compareInventories()

      Map inventory2 = jvmti.produceInventory();
     
      log.info("inventory1.size=" + inventory1.size());
      log.info("inventory2.size=" + inventory2.size());
     
      assertTrue("Test produced unexpected objects",jvmti.compareInventories(System.out, inventory1,inventory2,null, null, new InventoryDataPoint[] {new InventoryDataPoint(Object.class,10)}));
     
      conn.close();
     
      conn = null;
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.