dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

[EXPERIMENT] testing/synctest package experiment

Open genesor opened this issue 8 months ago • 2 comments
trafficstars

⚠️ DO NOT MERGE ⚠️

What does this PR do?

This is an experimentation of the new testing/synctest package

Before:

go test -timeout 45s -run ^TestSendRequestWithTimeout$ github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/net -v --count=1

=== RUN   TestSendRequestWithTimeout
--- PASS: TestSendRequestWithTimeout (11.71s)
PASS
ok  	github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/net	12.072s

After:

go test -timeout 45s -run ^TestSendRequestWithTimeout$ github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/net -tags=goexperiment.synctest -v --count=1

=== RUN   TestSendRequestWithTimeout
--- PASS: TestSendRequestWithTimeout (0.00s)
PASS
ok  	github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/net	0.336s

Motivation

Reviewer's Checklist

  • [ ] Changed code has unit tests for its functionality at or near 100% coverage.
  • [ ] System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • [ ] There is a benchmark for any new code, or changes to existing code.
  • [ ] If this interacts with the agent in a new way, a system test has been added.
  • [ ] Add an appropriate team label so this PR gets put in the right place for the release notes.
  • [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
  • [ ] For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

genesor avatar Mar 14 '25 14:03 genesor

Datadog Report

Branch report: ben.db/sync-test-rd Commit report: 30e6de7 Test service: dd-trace-go

:white_check_mark: 0 Failed, 5332 Passed, 72 Skipped, 2m 49.3s Total Time

Benchmarks

Benchmark execution time: 2025-03-14 15:53:09

Comparing candidate commit 7a1fe4e060cf637f50951306f563470a361dff1a in PR branch ben.db/sync-test-rd with baseline commit e45993802ac1e2c1f0de59e95e18e12de7343266 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 2 unstable metrics.

pr-commenter[bot] avatar Mar 14 '25 15:03 pr-commenter[bot]

Superseded by https://github.com/DataDog/dd-trace-go/pull/3907

darccio avatar Nov 14 '25 15:11 darccio