Example #1
0
File: CRM.java Project: deki/kieker
 public void getOffers() {
   // Call the Catalog component's getBook() method
   // and log its entry and exit timestamp using Kieker.
   final long tin = MONITORING_CONTROLLER.getTimeSource().getTime();
   this.catalog.getBook(false);
   final long tout = MONITORING_CONTROLLER.getTimeSource().getTime();
   final OperationExecutionRecord e =
       new OperationExecutionRecord(
           "public void kieker.examples.userguide.appendixAMQP.Catalog.getBook(boolean)",
           OperationExecutionRecord.NO_SESSION_ID,
           OperationExecutionRecord.NO_TRACE_ID,
           tin,
           tout,
           OperationExecutionRecord.NO_HOSTNAME,
           OperationExecutionRecord.NO_EOI_ESS,
           OperationExecutionRecord.NO_EOI_ESS);
   MONITORING_CONTROLLER.newMonitoringRecord(e);
 }
Example #2
0
 /**
  * Create a new BinaryNFsWriterThread.
  *
  * @param monitoringController the monitoring controller accessed by this thread
  * @param writeQueue the queue where the writer fetches its records from
  * @param mappingFileWriter writer for the mapping file (the file where class names are mapped to
  *     record ids)
  * @param path location where to files should go to (the path must point to a directory)
  * @param maxEntriesInFile limit for the number of records per log file
  * @param maxLogSize limit of the log file size
  * @param maxLogFiles limit of the number of log files
  * @param bufferSize size of the output buffer
  */
 public BinaryNFsWriterThread(
     final IMonitoringController monitoringController,
     final BlockingQueue<IMonitoringRecord> writeQueue,
     final MappingFileWriter mappingFileWriter,
     final String path,
     final int maxEntriesInFile,
     final int maxLogSize,
     final int maxLogFiles,
     final int bufferSize) {
   super(
       monitoringController,
       writeQueue,
       mappingFileWriter,
       path,
       maxEntriesInFile,
       maxLogSize,
       maxLogFiles);
   this.byteBuffer = ByteBuffer.allocateDirect(bufferSize);
   this.stringRegistry = monitoringController.getStringRegistry();
   this.fileExtension = BinaryCompressionMethod.NONE.getFileExtension();
 }
 @Override
 protected void checkControllerStateBeforeRecordsPassedToController(
     final IMonitoringController monitoringController) throws Exception {
   Assert.assertTrue(monitoringController.isMonitoringEnabled());
 }