@Override
    public void appStep(AppStep step) {
        switch (step) {
            case BeginFrame:
                startTime = System.nanoTime();
                break;
            case RenderFrame:
                renderTime = System.nanoTime();
                frames[frameIndex * 2] = renderTime - startTime;
                break;
            case EndFrame:
                long time = System.nanoTime();
                frames[frameIndex * 2 + 1] = time - renderTime;
                frameIndex++;
                if (frameIndex >= size) {
                    frameIndex = 0;
                }
                if (startTime - lastUpdate > updateInterval) {
                    updateMesh();
                    lastUpdate = startTime;
                }
                break;
        }
    }
Returns the mesh that contains the bar chart of tracked frame
 timings.

@return the pre-existing Mesh
jme3-core/src/main/java/com/jme3/app/BasicProfiler.java