Skip to content

Add BenchmarkDotNet benchmark for reading jobs within a timespan - #241

Draft
SkylineCookieMonster with Copilot wants to merge 2 commits into
mainfrom
copilot/add-benchmark-test-for-job-reading
Draft

Add BenchmarkDotNet benchmark for reading jobs within a timespan#241
SkylineCookieMonster with Copilot wants to merge 2 commits into
mainfrom
copilot/add-benchmark-test-for-job-reading

Conversation

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Adds a dedicated benchmark for the job-read scenario the issue targets: retrieving all jobs within a given timespan. The benchmark is structured to fit the existing solution layout and reuses the repository’s in-memory simulation infrastructure instead of depending on a live system.

  • Benchmark project

    • Adds a new DevPack.Benchmarks console project based on BenchmarkDotNet.
    • Wires the project into MediaOps Plan.slnx so the benchmark lives alongside the existing solution artifacts.
  • Benchmarked scenario

    • Adds ReadJobsWithinTimespanBenchmarks for reading all jobs in a time window.
    • Uses representative TimespanHours parameters (1, 24, 168) to cover short, daily, and weekly windows.
  • Production API path

    • Benchmarks the actual job retrieval path used for time-filtered reads by querying jobs through the production DOM helper path and materializing them as Job objects.
    • Exposes the required internals to the benchmark assembly without changing public API shape.
  • Repository-aligned setup

    • Reuses MediaOpsPlanSimulation to seed deterministic benchmark data in-memory.
    • Seeds a representative job set once during global setup, then measures the read/materialization path only.
timespanFilter = new ANDFilterElement<DomInstance>(
	DomInstanceExposers.DomDefinitionId.Equal(SlcWorkflowIds.Definitions.Jobs.Id),
	DomInstanceExposers.FieldValues.DomInstanceField(SlcWorkflowIds.Sections.JobInfo.JobStart).GreaterThanOrEqual(windowStartUtc),
	DomInstanceExposers.FieldValues.DomInstanceField(SlcWorkflowIds.Sections.JobInfo.JobEnd).LessThanOrEqual(windowEndUtc));

return api.DomHelpers.SlcWorkflowHelper
	.GetJobs(timespanFilter)
	.Select(domJob => new Job(api, domJob))
	.ToArray();

Copilot AI changed the title [WIP] Add benchmark test for reading all jobs within a timespan Add BenchmarkDotNet benchmark for reading jobs within a timespan Jul 10, 2026
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