Package com.dotcms.repackage.org.github.jamm

Examples of com.dotcms.repackage.org.github.jamm.MemoryMeter


     * @throws Exception
     */
    public Instrumentation findInstrumentation () throws Exception {

        //Find the instrumentation object
        MemoryMeter mm = new MemoryMeter();

        Field instrumentationField = MemoryMeter.class.getDeclaredField( "instrumentation" );//We need to access it using reflection
        instrumentationField.setAccessible( true );

        Instrumentation instrumentation = (Instrumentation) instrumentationField.get( mm );
View Full Code Here


    }

   
    public String getAllsizes() {
        StringBuilder b=new StringBuilder();
        MemoryMeter mm=new MemoryMeter();
        b.append("this.applicationAttributes ").append(mm.measureDeep(this.applicationAttributes)).append("\n");
        b.append("this.configuration ").append(mm.measureDeep(this.configuration)).append("\n");
        b.append("this.eventCartridge ").append(mm.measureDeep(this.eventCartridge)).append("\n");
        b.append("this.introspector ").append(mm.measureDeep(this.introspector)).append("\n");
        b.append("this.overridingProperties ").append(mm.measureDeep(this.overridingProperties)).append("\n");
        b.append("this.parserPool ").append(mm.measureDeep(this.parserPool)).append("\n");
        //b.append("this.resourceManager ").append(mm.measureDeep(this.resourceManager)).append("\n");
       
        b.append("this.runtimeDirectives ").append(mm.measureDeep(this.runtimeDirectives)).append("\n");
        b.append("this.runtimeDirectivesShared ").append(mm.measureDeep(this.runtimeDirectivesShared)).append("\n");
        b.append("this.uberSpect ").append(mm.measureDeep(this.uberSpect)).append("\n");
        b.append("this.vmFactory ").append(mm.measureDeep(this.vmFactory)).append("\n");
        return b.toString();
    }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.github.jamm.MemoryMeter

Copyright © 2018 www.massapicom. 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.