Examples of HeapHisto


Examples of org.gridkit.lab.jvm.attach.HeapHisto

                name = name.substring(0, name.indexOf("@"));
                return Integer.parseInt(name);
            }
        });
       
        HeapHisto initial = histo(storagePid, true);
        System.out.println("Initial heap size: " + (initial.totalBytes() >> 20) + "MiB");
       
        Loader loader = new Loader();
        loader.cacheName = cacheName;
        loader.rangeStart = 1000000;       
        loader.rangeFinish = 1000000 + objectCount;
       
       
        System.out.println("Cold loading");
        cloud.node("client").exec(loader);
        HeapHisto loaded1 = histo(storagePid, true);
       
        System.out.println("Storage heap usage delta: " + ((loaded1.totalBytes() - initial.totalBytes()) >> 20) + "MiB");
       
        cloud.node("client").getCache(cacheName).clear();
        cloud.node("client").getCache(cacheName).size();

        HeapHisto empty = histo(storagePid, true);
        System.out.println("Empty heap size: " + (empty.totalBytes() >> 20) + "MiB");

        System.out.println("Warm loading");
        cloud.node("client").exec(loader);
        HeapHisto loaded2 = histo(storagePid, true);
   
        System.out.println("Storage heap usage delta: " + ((loaded2.totalBytes() - empty.totalBytes()) >> 20) + "MiB");
       
        System.out.println("Storage heap full vs initial summary:");
        System.out.println(HeapHisto.subtract(loaded1, initial).print(30));

        System.out.println("Storage heap full vs empty summary:");
        System.out.println(HeapHisto.subtract(loaded2, empty).print(30));

        System.out.println("Storage full heap summary:");
        System.out.println(loaded2.print(30));

        System.out.println("Storage heap initial vs empty summary:");
        System.out.println(HeapHisto.subtract(empty, initial).print(30));
       
  }
View Full Code Here

Examples of org.gridkit.lab.jvm.attach.HeapHisto

      try {
        if (live && dead) {
          SJK.failAndPrintUsage("--live and --dead are mutually exclusive");
        }
       
        HeapHisto histo;
       
        if (live) {
          histo = HeapHisto.getHistoLive(pid, 300000);
        }
        else if (dead) {
          histo = HeapHisto.getHistoDead(pid, 300000);
        }
        else {
          histo = HeapHisto.getHistoAll(pid, 300000);
        }
       
        System.out.println(histo.print(n));
       
      } catch (Exception e) {
        SJK.fail(e.toString());
      }     
    }
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.