end • AI Agents Framework

end: End tracking and record to the wrapper Profiler.

end

Method

</div>

This is a method of the StreamingTracker class in the profiler module.

End tracking and record to the wrapper Profiler.

Idempotent: safe to call explicitly inside a `with Profiler.streaming(...) block (whose finally also calls end()`); only the first invocation records a StreamingRecord.

Signature

python
def end(total_tokens: int) -> None

Parameters

ParamField int

No description available.

Uses

  • time.perf_counter
  • Profiler.record_streaming

Source

View on GitHub

praisonai/profiler.py at line 233