Package omeis.providers.re
Class RenderingStats
- java.lang.Object
-
- omeis.providers.re.RenderingStats
-
public class RenderingStats extends java.lang.ObjectExposes methods to time the various steps in the rendering process and provides a stats report. Every time therendermethod is invoked a newRenderingStatsobject is created that can then be accessed by the currentRenderingStrategyto notify start/end times of memory allocation, IO, and rendering time.- Since:
- OME2.2
-
-
Constructor Summary
Constructors Constructor Description RenderingStats(Renderer context, omeis.providers.re.data.PlaneDef plane)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendIO(int c)Notifies the end of pixels data retrieval for the specified wavelength (channel).voidendMalloc()Notifies the end of the allocation of an RGB memory buffers for the rendering process.voidendRendering()Notifies the end of the trasnformation of the raw pixels data.java.lang.StringgetStats()Returns a stats report ready to be written to the log file.voidstartIO(int c)Notifies the start of pixels data retrieval for the specified wavelength (channel).voidstartMalloc()Notifies the start of the allocation of an RGB memory buffer for the rendering process.voidstartRendering()Notifies the start of the trasnformation of the raw pixels data.voidstop()Notifies this object that the rendering process has finished.
-
-
-
Constructor Detail
-
RenderingStats
public RenderingStats(Renderer context, omeis.providers.re.data.PlaneDef plane)
Creates a new instance. This constructor takes the current time, which is then used to calculate the total time therendermethod took to execute. TheRenderertakes care of creating this object right before the rendering process starts and then calls thestopmethod just after the rendering process ends.- Parameters:
context- The object whoserendermethod is being timed. Assumed not to benull.plane- Defines the plane that therenderis processing. Assumed not to benull.
-
-
Method Detail
-
startMalloc
public void startMalloc()
Notifies the start of the allocation of an RGB memory buffer for the rendering process.- See Also:
endMalloc()
-
endMalloc
public void endMalloc()
Notifies the end of the allocation of an RGB memory buffers for the rendering process.- See Also:
startMalloc()
-
startIO
public void startIO(int c)
Notifies the start of pixels data retrieval for the specified wavelength (channel).- Parameters:
c- The wavelength (channel) index.- See Also:
endIO(int)
-
endIO
public void endIO(int c)
Notifies the end of pixels data retrieval for the specified wavelength (channel).- Parameters:
c- The wavelength (channel) index.- See Also:
startIO(int)
-
startRendering
public void startRendering()
Notifies the start of the trasnformation of the raw pixels data.- See Also:
endRendering()
-
endRendering
public void endRendering()
Notifies the end of the trasnformation of the raw pixels data.- See Also:
startRendering()
-
stop
public void stop()
Notifies this object that the rendering process has finished. The total rendering time is computed. That is, the time therendermethod took to execute. ThegetStatsmethod can now be invoked to retrieve the stats report.
-
getStats
public java.lang.String getStats()
Returns a stats report ready to be written to the log file. The report includes memory allocation, IO, and rendering times as well as a summary of the rendering context in which the call to therendermethod took place. This method only provides a meaningful report if it is called after thestopmethod.- Returns:
- A log message embedding the stats report.
-
-