Skip to content

Optimize Benchmark Plugin - #509

Open
smanes0213 wants to merge 4 commits into
masterfrom
development/Benchmark_QA_Optimizations
Open

Optimize Benchmark Plugin#509
smanes0213 wants to merge 4 commits into
masterfrom
development/Benchmark_QA_Optimizations

Conversation

@smanes0213

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 23, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an API surface to the QualityAssurance benchmark interface to allow callers to supply an explicit baseline (e.g., from a previous run) so subsequent benchmark triggers can compare against it without requiring an initial warm-up run.

Changes:

  • Introduces IBenchmark::SetBaseline(IBenchmarkResultIterator* baseline) to set baseline comparison data externally.
  • Documents how the supplied baseline is used for latency and memory comparisons.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread qa_interfaces/IBenchmark.h Outdated
Comment thread qa_interfaces/IBenchmark.h Outdated
Copilot AI review requested due to automatic review settings July 23, 2026 09:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

qa_interfaces/IBenchmark.h:102

  • Adding SetBaseline to the existing IBenchmark interface (ID_BENCHMARK) is a breaking interface change: consumers/implementations compiled against older headers can still QueryInterface the same ID but will have incompatible vtable/RPC method ordering, leading to crashes or misrouted calls. Please version this change by introducing a new interface with a new ID (e.g., IBenchmark2) or otherwise ensure backward/forward compatibility for mixed-version deployments.
        // @brief Set an explicit baseline from externally-supplied results, e.g. from a
        //        previous release run, so that the next trigger compares against it
        //        without requiring a warm-up run first.
        //        Setting LatencyThreshold() or MemoryThreshold() still clears this baseline.
        // @param baseline: Iterator over BenchmarkResult entries; apiName and

Comment thread qa_interfaces/IBenchmark.h
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 23, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

qa_interfaces/IBenchmark.h:106

  • Adding a new pure virtual method to IBenchmark changes the vtable and is a breaking change for any existing implementers/binary consumers keyed to ID_BENCHMARK. To preserve compatibility, consider introducing a new interface (e.g., IBenchmark2 with a new ID) or otherwise versioning the interface so old clients can still QueryInterface the original contract.
        // @brief Set an explicit baseline from externally-supplied results, e.g. from a
        //        previous release run, so that the next trigger compares against it
        //        without requiring a warm-up run first.
        //        Setting LatencyThreshold() or MemoryThreshold() still clears this baseline.
        // @param baseline: Iterator over BenchmarkResult entries; apiName and
        //                  roundTrip.avgNs are used for latency comparison,
        //                  memory stats for memory threshold comparison.
        virtual Core::hresult SetBaseline(IBenchmarkResultIterator* const& baseline /* @in */) = 0;

Comment thread qa_interfaces/IBenchmark.h Outdated
Copilot AI review requested due to automatic review settings July 23, 2026 09:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

qa_interfaces/IBenchmark.h:110

  • SetBaseline() is inserted before Register()/Unregister(), which changes the virtual method order (vtable/RPC method indices) and can break binary/RPC compatibility: existing clients calling Register/Unregister could end up invoking SetBaseline instead. New interface methods should be appended at the end (or introduced via a new interface ID/version) to preserve call ordering. Also, since the callee doesn't take ownership of the iterator, the contract should explicitly state that the iterator is only accessed during the SetBaseline call and must not be retained beyond it.
        // @brief Set an explicit baseline from externally-supplied results, e.g. from a
        //        previous release run, so that the next trigger compares against it
        //        without requiring a warm-up run first.
        //        Setting LatencyThreshold() or MemoryThreshold() still clears this baseline.
        // @param baseline: Iterator over BenchmarkResult entries; apiName and
        //                  roundTrip.avgNs are used for latency comparison,
        //                  memory stats for memory threshold comparison.
        //                  The callee does NOT AddRef or Release the iterator; ownership
        //                  stays with the caller.
        virtual Core::hresult SetBaseline(IBenchmarkResultIterator* baseline /* @in */) = 0;

        virtual Core::hresult Register(IBenchmark::INotification* sink) = 0;
        virtual Core::hresult Unregister(IBenchmark::INotification* sink) = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants