class
Tessell::App::PerfCollector
- Tessell::App::PerfCollector
- Reference
- Object
Defined in:
tessell/app/perf.crConstant Summary
-
SAMPLE_CAP =
256 -
有界样本容量:约 4 秒 @60fps 的帧样本,环形覆盖。
-
SEGMENT_COUNT =
5
Constructors
Instance Method Summary
- #enabled=(v : Bool) : Nil
- #enabled? : Bool
- #frame_count : Int32
-
#frame_end(frame_ms : Float32) : Nil
帧收口(frame_ms 来自宿主钟差,由宿主传入)。 失效→呈现延迟(帧粒度):失效帧 lag=0;此后每过一个未 present 的 帧累加 1;present 帧归零并清除 pending。
- #frame_start : Nil
- #hop_count : Int32
-
#idle_last_frame? : Bool
静止画面判定:最近一帧五段全零 op(无多余提交的验收口径)。
- #latest : FrameSample | Nil
-
#mark_invalidated(dirty_nodes : Int32) : Nil
失效标记:本帧有节点进入 dirty(帧粒度)。
-
#percentile(segment : Segment, p : Float32) : Float32
分位数:取指定段的帧样本值排序后线性插值。仅人工定位读取面。
- #percentile_frame_ms(p : Float32) : Float32
-
#record(segment : Segment, ops : Int32, start_ms : Int64, end_ms : Int64) : Nil
段计时入口(宿主钟毫秒差;由宿主驱动,collector 不取钟)。
-
#record_hop : Nil
跨 Isolated context 提交(engine→UI hop;只计数,不做跨钟差)。
-
#record_ops(segment : Segment, ops : Int32) : Nil
仅计数(无钟):适合纯 op 流分段。
- #sample(index : Int32) : FrameSample | Nil
-
#sample_size : Int32
最近样本数(≤ SAMPLE_CAP)。
-
#to_json(io : IO) : Nil
离线 JSON(人工 bench 管道读取;不进门禁)。
- #to_json_string : String
Constructor Detail
Instance Method Detail
def frame_end(frame_ms : Float32) : Nil
#
帧收口(frame_ms 来自宿主钟差,由宿主传入)。 失效→呈现延迟(帧粒度):失效帧 lag=0;此后每过一个未 present 的 帧累加 1;present 帧归零并清除 pending。
分位数:取指定段的帧样本值排序后线性插值。仅人工定位读取面。
段计时入口(宿主钟毫秒差;由宿主驱动,collector 不取钟)。