Package org.jboss.profiler.aop.logger

Examples of org.jboss.profiler.aop.logger.FileProfileLogger


        super.tearDown();
    }

    public void testEnterMethodFormats() throws Exception {
        ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream(1024);
        FileProfileLogger logger = new FileProfileLogger(arrayOutput);

        for (int i=0;i<100;i++) {
            logger.enterMethod(1,1,1,1);
        }

        ByteArrayInputStream input = new ByteArrayInputStream(arrayOutput.toByteArray());
        SpyFileReader reader = new SpyFileReader(input,false);
View Full Code Here


        }
    }

    public void testExitMethodFormats() throws Exception {
        ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream(1024);
        FileProfileLogger logger = new FileProfileLogger(arrayOutput);

        for (int i=0;i<100;i++) {
            logger.exitMethod(1,1,1);
        }

        ByteArrayInputStream input = new ByteArrayInputStream(arrayOutput.toByteArray());
        SpyFileReader reader = new SpyFileReader(input,false);
View Full Code Here

        }
    }

    public void testLoadClassFormats() throws Exception {
        ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream(1024);
        FileProfileLogger logger = new FileProfileLogger(arrayOutput);

        for (int i=0;i<100;i++) {
            logger.loadClass(1,1,this.getClass().getName(),10);
            for (int j=0;j<10;j++) logger.loadMethod(1,1,1,"method" +j,"()");
        }

        ByteArrayInputStream input = new ByteArrayInputStream(arrayOutput.toByteArray());
        SpyFileReader reader = new SpyFileReader(input,false);
View Full Code Here

        }
    }

    public void testNewObject() throws Exception {
        ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream(1024);
        FileProfileLogger logger = new FileProfileLogger(arrayOutput);

        for (int i=0;i<100;i++) {
            logger.newObject(1,1,1,1,1);
            logger.releaseObject(1,1);
        }

        ByteArrayInputStream input = new ByteArrayInputStream(arrayOutput.toByteArray());
        SpyFileReader reader = new SpyFileReader(input,false);
View Full Code Here

        }
    }

    public void testThread() throws Exception {
        ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream(1024);
        FileProfileLogger logger = new FileProfileLogger(arrayOutput);

        for (int i=0;i<100;i++) {
            logger.startThread(1,1,"test"+i);
            logger.finishThread(1,1);
        }

        ByteArrayInputStream input = new ByteArrayInputStream(arrayOutput.toByteArray());
        SpyFileReader reader = new SpyFileReader(input,false);
View Full Code Here

    }


    public void testHeader() throws Exception {
        ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream(1024);
        FileProfileLogger logger = new FileProfileLogger(arrayOutput);

        logger.headerSignature(100);
        for (int i=0;i<100;i++) {
            logger.loadClass(1,1,"test",10);
        }

        ByteArrayInputStream input = new ByteArrayInputStream(arrayOutput.toByteArray());
        SpyReader reader = new SpyReader(input, new InputStream[] {});
View Full Code Here

        String fileName=filePrefix + "_1_main_" + System.currentTimeMillis() + ".log";

        System.out.println(outputLocal + "/" + fileName);

        mainLog = new FileProfileLogger(new FileOutputStream(new File(outputLocal,fileName)));
        mainLog.headerSignature(System.currentTimeMillis());

        initialized=true;
  }
View Full Code Here

      String fileName=filePrefix + "_1_thread_" + System.currentTimeMillis() + "_" + Thread.currentThread().hashCode() +"_0.log";

      File file = new File (outputLocal,fileName);
      // TODO: Use BufferedOutputStream + GzipOutputStream
      FileOutputStream output = new FileOutputStream(file);
      FileProfileLogger logger = new FileProfileLogger(output);

      return logger;
  }
View Full Code Here

TOP

Related Classes of org.jboss.profiler.aop.logger.FileProfileLogger

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.