Class RenderBenchmarkCollector.CapturingBenchmark
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.visitor.paint.RenderBenchmarkCollector
-
- org.openstreetmap.josm.data.osm.visitor.paint.RenderBenchmarkCollector.CapturingBenchmark
-
- Direct Known Subclasses:
RenderBenchmarkCollector.LoggingBenchmark
- Enclosing class:
- RenderBenchmarkCollector
public static class RenderBenchmarkCollector.CapturingBenchmark extends RenderBenchmarkCollector
A benchmark implementation that captures the times
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.osm.visitor.paint.RenderBenchmarkCollector
RenderBenchmarkCollector.CapturingBenchmark, RenderBenchmarkCollector.LoggingBenchmark
-
-
Field Summary
Fields Modifier and Type Field Description protected longtimeFinishedprotected longtimeGenerateDoneprotected longtimeSortingDoneprotected longtimeStart
-
Constructor Summary
Constructors Constructor Description CapturingBenchmark()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetDrawTime()Get the draw timelonggetGenerateTime()Get the time needed for generating the styleslonggetSortTime()Get the time needed for computing the draw ordervoidrenderDone()Notified when the render method is done.booleanrenderDraw(java.util.List<StyledMapRenderer.StyleRecord> allStyleElems)Notified when the renderer method starts drawingbooleanrenderSort()Notified when the renderer method starts sorting the stylesvoidrenderStart(double circum)Notified when the renderer method starts preparing the data-
Methods inherited from class org.openstreetmap.josm.data.osm.visitor.paint.RenderBenchmarkCollector
defaultBenchmarkSupplier, getCurrentTimeMilliseconds
-
-
-
-
Field Detail
-
timeStart
protected long timeStart
-
timeGenerateDone
protected long timeGenerateDone
-
timeSortingDone
protected long timeSortingDone
-
timeFinished
protected long timeFinished
-
-
Constructor Detail
-
CapturingBenchmark
public CapturingBenchmark()
-
-
Method Detail
-
renderStart
public void renderStart(double circum)
Description copied from class:RenderBenchmarkCollectorNotified when the renderer method starts preparing the data- Overrides:
renderStartin classRenderBenchmarkCollector- Parameters:
circum- The current circum of the view.
-
renderSort
public boolean renderSort()
Description copied from class:RenderBenchmarkCollectorNotified when the renderer method starts sorting the styles- Overrides:
renderSortin classRenderBenchmarkCollector- Returns:
trueif the renderer should continue to render
-
renderDraw
public boolean renderDraw(java.util.List<StyledMapRenderer.StyleRecord> allStyleElems)
Description copied from class:RenderBenchmarkCollectorNotified when the renderer method starts drawing- Overrides:
renderDrawin classRenderBenchmarkCollector- Parameters:
allStyleElems- All the elements that are painted. Unsorted- Returns:
trueif the renderer should continue to render
-
getGenerateTime
public long getGenerateTime()
Get the time needed for generating the styles- Returns:
- The time in ms
-
getSortTime
public long getSortTime()
Get the time needed for computing the draw order- Returns:
- The time in ms
-
renderDone
public void renderDone()
Description copied from class:RenderBenchmarkCollectorNotified when the render method is done.- Overrides:
renderDonein classRenderBenchmarkCollector
-
getDrawTime
public long getDrawTime()
Get the draw time- Returns:
- The time in ms
-
-