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 long
timeFinished
protected long
timeGenerateDone
protected long
timeSortingDone
protected long
timeStart
-
Constructor Summary
Constructors Constructor Description CapturingBenchmark()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDrawTime()
Get the draw timelong
getGenerateTime()
Get the time needed for generating the styleslong
getSortTime()
Get the time needed for computing the draw ordervoid
renderDone()
Notified when the render method is done.boolean
renderDraw(java.util.List<StyledMapRenderer.StyleRecord> allStyleElems)
Notified when the renderer method starts drawingboolean
renderSort()
Notified when the renderer method starts sorting the stylesvoid
renderStart(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:RenderBenchmarkCollector
Notified when the renderer method starts preparing the data- Overrides:
renderStart
in classRenderBenchmarkCollector
- Parameters:
circum
- The current circum of the view.
-
renderSort
public boolean renderSort()
Description copied from class:RenderBenchmarkCollector
Notified when the renderer method starts sorting the styles- Overrides:
renderSort
in classRenderBenchmarkCollector
- Returns:
true
if the renderer should continue to render
-
renderDraw
public boolean renderDraw(java.util.List<StyledMapRenderer.StyleRecord> allStyleElems)
Description copied from class:RenderBenchmarkCollector
Notified when the renderer method starts drawing- Overrides:
renderDraw
in classRenderBenchmarkCollector
- Parameters:
allStyleElems
- All the elements that are painted. Unsorted- Returns:
true
if 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:RenderBenchmarkCollector
Notified when the render method is done.- Overrides:
renderDone
in classRenderBenchmarkCollector
-
getDrawTime
public long getDrawTime()
Get the draw time- Returns:
- The time in ms
-
-