Package com.jme3.app
Class BasicProfiler
java.lang.Object
com.jme3.app.BasicProfiler
- All Implemented Interfaces:
- AppProfiler
An AppProfiler implementation that collects two
  per-frame application-wide timings for update versus
  render and uses it to create a bar chart style Mesh.
  The number of frames displayed and the update interval
  can be specified.  The chart Mesh is in 'milliseconds'
  and can be scaled up or down as required.
  
Each column of the chart represents a single frames timing. Yellow represents the time it takes to perform all non-rendering activities (running enqueued tasks, stateManager.update, control.update(), etc) while the cyan portion represents the rendering time.
When the end of the chart is reached, the current frame cycles back around to the beginning.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidCalled at the beginning of the specified AppStep.voidappSubStep(String... additionalInfo) Called as a substep of the previous AppStepprotected final voidintgetMesh()Returns the mesh that contains the bar chart of tracked frame timings.longfinal voidsetFrameCount(int size) Sets the number of frames to display and track.voidsetUpdateInterval(long nanos) Sets the number of nanoseconds to wait before updating the mesh.voidCalled at the beginning of the specified SpStep (SceneProcessor step).protected voidvoidvpStep(VpStep step, ViewPort vp, RenderQueue.Bucket bucket) Called at the beginning of the specified VpStep during the rendering of the specified ViewPort.
- 
Constructor Details- 
BasicProfilerpublic BasicProfiler()
- 
BasicProfilerpublic BasicProfiler(int size) 
 
- 
- 
Method Details- 
setFrameCountpublic final void setFrameCount(int size) Sets the number of frames to display and track. By default, this is 1280.- Parameters:
- size- the desired number of frames (≥0, default=1280)
 
- 
getFrameCountpublic int getFrameCount()
- 
setUpdateIntervalpublic void setUpdateInterval(long nanos) Sets the number of nanoseconds to wait before updating the mesh. By default, this is once a millisecond, i.e. 1000000 nanoseconds.- Parameters:
- nanos- the desired update interval (in nanoseconds, default=1e6)
 
- 
getUpdateIntervalpublic long getUpdateInterval()
- 
getMeshReturns the mesh that contains the bar chart of tracked frame timings.- Returns:
- the pre-existing Mesh
 
- 
createMeshprotected final void createMesh()
- 
updateMeshprotected void updateMesh()
- 
appStepDescription copied from interface:AppProfilerCalled at the beginning of the specified AppStep.- Specified by:
- appStepin interface- AppProfiler
- Parameters:
- step- the application-level step that's about to begin
 
- 
appSubStepDescription copied from interface:AppProfilerCalled as a substep of the previous AppStep- Specified by:
- appSubStepin interface- AppProfiler
- Parameters:
- additionalInfo- information about the substep
 
- 
vpStepDescription copied from interface:AppProfilerCalled at the beginning of the specified VpStep during the rendering of the specified ViewPort. For bucket-specific steps the Bucket parameter will be non-null.- Specified by:
- vpStepin interface- AppProfiler
- Parameters:
- step- the ViewPort-level step that's about to begin
- vp- which ViewPort is being processed
- bucket- which Bucket is being processed
 
- 
spStepDescription copied from interface:AppProfilerCalled at the beginning of the specified SpStep (SceneProcessor step). For more detailed steps it is possible to provide additional information as strings, like the name of the processor.- Specified by:
- spStepin interface- AppProfiler
- Parameters:
- step- the SceneProcessor step that's about to begin
- additionalInfo- information about the SceneProcessor step
 
 
-