Package omeis.providers.re
Class RenderingStats
- java.lang.Object
-
- omeis.providers.re.RenderingStats
-
public class RenderingStats extends java.lang.Object
Exposes methods to time the various steps in the rendering process and provides a stats report. Every time therender
method is invoked a newRenderingStats
object is created that can then be accessed by the currentRenderingStrategy
to 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 void
endIO(int c)
Notifies the end of pixels data retrieval for the specified wavelength (channel).void
endMalloc()
Notifies the end of the allocation of an RGB memory buffers for the rendering process.void
endRendering()
Notifies the end of the trasnformation of the raw pixels data.java.lang.String
getStats()
Returns a stats report ready to be written to the log file.void
startIO(int c)
Notifies the start of pixels data retrieval for the specified wavelength (channel).void
startMalloc()
Notifies the start of the allocation of an RGB memory buffer for the rendering process.void
startRendering()
Notifies the start of the trasnformation of the raw pixels data.void
stop()
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 therender
method took to execute. TheRenderer
takes care of creating this object right before the rendering process starts and then calls thestop
method just after the rendering process ends.- Parameters:
context
- The object whoserender
method is being timed. Assumed not to benull
.plane
- Defines the plane that therender
is 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 therender
method took to execute. ThegetStats
method 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 therender
method took place. This method only provides a meaningful report if it is called after thestop
method.- Returns:
- A log message embedding the stats report.
-
-