public void initializePerformanceMonitoring( final PerformanceMonitorContext monitorContext ) { summaryWatch.stop(); eventWatch.stop(); summaryWatch = monitorContext.createStopWatch( PerformanceTags.getSummaryTag( PerformanceTags.REPORT_LAYOUT_PROCESS_SUFFIX, getClass().getSimpleName() ) ); eventWatch = monitorContext.createStopWatch( PerformanceTags.getDetailTag( PerformanceTags.REPORT_LAYOUT_PROCESS_SUFFIX, getClass().getSimpleName() ) ); }
@Override public Object answer(InvocationOnMock invocation) throws Throwable { ((PerformanceLoggingStopWatch) invocation.getMock()).stop(); return null; } }).when(stopWatch).close();
public void restart( final ReportState state ) throws ReportProcessingException { try { stopWatch.start(); if ( inlineDataRowRuntime == null ) { inlineDataRowRuntime = new InlineDataRowRuntime(); } inlineDataRowRuntime.setState( state ); final ExpressionRuntime oldRuntime; final OutputFunction outputFunction = getOutputFunction(); if ( outputFunction != null ) { oldRuntime = outputFunction.getRuntime(); outputFunction.setRuntime( inlineDataRowRuntime ); } else { oldRuntime = null; } try { if ( outputFunction != null ) { outputFunction.restart( state ); } } finally { if ( outputFunction != null ) { outputFunction.setRuntime( oldRuntime ); } } } finally { stopWatch.stop( true ); } }
validateStopWatch.stop( true );
protected boolean startParagraphBox( final RenderBox box ) { if ( box.getNodeType() != LayoutNodeTypes.TYPE_BOX_PARAGRAPH ) { return true; } final ParagraphRenderBox paragraphBox = (ParagraphRenderBox) box; if ( paragraphBox.isLineBoxUnchanged() ) { nodeContext.updateX2( paragraphBox.getCachedMaxChildX2() ); return false; } paragraphLayoutWatch.start(); try { paragraphBox.clearLayout(); textMinorAxisLayoutStep.process( paragraphBox, getNodeContext(), getPageGrid() ); paragraphBox.updateMinorLayoutAge(); paragraphBox.setCachedMaxChildX2( nodeContext.getMaxChildX2() ); } finally { paragraphLayoutWatch.stop( true ); } return false; }
public void fireReportEvent( final ReportEvent event ) { try { stopWatch.start(); if ( inlineDataRowRuntime == null ) { inlineDataRowRuntime = new InlineDataRowRuntime(); } final ReportState state = inlineDataRowRuntime.getState(); inlineDataRowRuntime.setState( event.getState() ); try { final int pageEventMask = ReportEvent.PAGE_STARTED | ReportEvent.PAGE_FINISHED; if ( ( event.getType() & pageEventMask ) == 0 && ( ( event.getType() & ReportEvent.GROUP_BODY_FINISHED ) == ReportEvent.GROUP_BODY_FINISHED ) ) { fireGroupBodyFinishedEvent( event ); } else { super.fireReportEvent( event ); } } catch ( InvalidReportStateException exception ) { throw exception; } catch ( Throwable t ) { throw new InvalidReportStateException( "Failed to fire report event for sub-layout-process", t ); } finally { inlineDataRowRuntime.setState( state ); } } finally { stopWatch.stop( true ); } }
preDataSw.start(); state = processPrepareLevels( state, maxRows ); preDataSw.stop( true );