refactor(profiler): add RAII step scope for service-wide timeline#1133
Open
psmarter wants to merge 1 commit into
Open
refactor(profiler): add RAII step scope for service-wide timeline#1133psmarter wants to merge 1 commit into
psmarter wants to merge 1 commit into
Conversation
Collaborator
AI Code Review - PR #1133Status: LGTM Summary: P0/0 · P1/0 · P2/1 · P3/0 lgtm ready to ci Non-blocking SuggestionsP2
Checklist Violations (1 fail / 72 total)General Principles Checklist
Strengths
|
LLLLKKKK
approved these changes
Jun 26, 2026
| }, | ||
| [](py::tuple t) { | ||
| if (t.size() != 12) | ||
| if (t.size() != 12 && t.size() != 15) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Service-wide timeline profiling should work consistently across engine types, including embedding workloads such as BERT. This PR also replaces the manual profiler
tick()flow with an RAII step scope so the profiling step boundary is explicit and exception-safe.Changes
StepWindowProfiler::StepScopeto bracket one engine step.beginStep()on construction.endStep()on destruction.endStep()exceptions without propagating them into the enginepath.
StepWindowProfiler::configureFromConfig()for service-wide timeline setup fromProfilingDebugLoggingConfig.NormalEngineEmbeddingEngine--gen_timeline_start_step/GEN_TIMELINE_START_STEP--gen_timeline_num_steps/GEN_TIMELINE_NUM_STEPS--gen_timeline_trace_name/GEN_TIMELINE_TRACE_NAMEProfilingDebugLoggingConfig.Validation
git diff --check origin/main..HEADpython3 -m py_compile rtp_llm/server/server_args/profile_debug_logging_group_args.pybazelisk build //rtp_llm/cpp/engine_base:profiler //rtp_llm/cpp/normal_engine:normal_engine//rtp_llm/cpp/embedding_engine:embedding_engine --config=rocmBuild result: