PerfMeter
PerfMeter copied to clipboard
Gather interesting metrics
Supported right now
Per frame:
- Framerate (frames drawn over a second)
- Frame time (JavaScript time spent in rAFs execution)
- Number of rAFs
CanvasRenderingContext2D:
- JavaScript time spent on canvas methods
- Canvas methods calls
- Optional: log of operations with start and end time
WebGLRenderingContext (per frame)
- JavaScript time spent on canvas methods
- Canvas methods calls
- Optional: log of operations with start and end time
- GPU time
- Shaders GPU time (not stable yet)
- useProgram calls, global WebGLProgram count
- bindTexture calls, global WebGLTexture count
- bindFramebuffer, global WebGLFramebuffer count
- drawArrays and drawElement calls
- points, lines and triangles from drawArrays and drawElements
- instanced drawArrays and drawElements (via ANGLE_instanced_arrays)
- points, lines and triangles from instanced drawArrays and drawElements
WebGL2RenderingContext (not yet ported from previous version)
- Same as WebGLRenderingContext
- drawArraysInstanced and drawElementsInstanced instead of ANGLE_instanced_arrays
- points, lines and triangles from drawArraysInstanced and drawElementsInstanced
Browser:
- Memory: used heap, total heap size
WebGL implementation (via WEBGL_debug_renderer_info):
- Unmasked vendor
- Unmasked renderer
- Version
- Language version
Proposed
- Texture upload/copy time
- Indirectly track GPU memory from upload methods
- State changes (total, graph)
Texture uploading time?
Good one. I think texImage2D, texSubImage2D, etc. can be profiled with the TimeLine as any JavaScript method. The call log in the extension would make it easier to find specific calls, or all calls related to a specific texture.
state changes see from slides 49 to 55,http://media.steampowered.com/apps/steamdevdays/slides/beyondporting.pdf
@Kuranes good one, too. The visual aid in that presentation would be pretty cool to have, too
This may be off-topic, but how can you tell which shader is which under "Shaders GPU time"? I get a new hash every time. Are they listed in any particular order?
@marquizzo they're added in order they're called (via useProgram) in the frame. the hash identifies each program. you should be seeing the same hashes in more or less the same order. if you're seeing different hashes every time, make sure you're not creating new shaders constantly! :)