Skip to content

[CI Visibility] Avoid failing unfinished tests#6063

Merged
tonyredondo merged 1 commit into
masterfrom
tony/civisibility-avoid-failing-unfinished-tests
Sep 23, 2024
Merged

[CI Visibility] Avoid failing unfinished tests#6063
tonyredondo merged 1 commit into
masterfrom
tony/civisibility-avoid-failing-unfinished-tests

Conversation

@tonyredondo

@tonyredondo tonyredondo commented Sep 23, 2024

Copy link
Copy Markdown
Member

Summary of changes

This PR changes the current behaviour of failing opened tests when the test process is being shutdown (SIGTERM).
With this change now those tests are marked as "Skipped" with the "test.skip_reason = Test is being closed due to test session shutdown."

Reason for change

Current behaviour is causing problem in CI when jobs gets cancelled automatically when a new commit appears, skewing the stats and results of the test sessions.

Implementation details

Changes in the method that closes the opened test events.

@tonyredondo tonyredondo self-assigned this Sep 23, 2024
@tonyredondo
tonyredondo marked this pull request as ready for review September 23, 2024 14:34
@tonyredondo
tonyredondo requested review from a team as code owners September 23, 2024 14:34

@robertpi robertpi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems mostly harmless.

@datadog-ddstaging

datadog-ddstaging Bot commented Sep 23, 2024

Copy link
Copy Markdown

Datadog Report

Branch report: tony/civisibility-avoid-failing-unfinished-tests
Commit report: db7e06a
Test service: dd-trace-dotnet

✅ 0 Failed, 364281 Passed, 2083 Skipped, 15h 56m 24.7s Total Time

@andrewlock

Copy link
Copy Markdown
Member

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6063) - mean (70ms)  : 67, 72
     .   : milestone, 70,
    master - mean (70ms)  : 68, 72
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (6063) - mean (1,096ms)  : 1075, 1117
     .   : milestone, 1096,
    master - mean (1,099ms)  : 1081, 1117
     .   : milestone, 1099,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6063) - mean (108ms)  : 106, 110
     .   : milestone, 108,
    master - mean (108ms)  : 105, 110
     .   : milestone, 108,

    section CallTarget+Inlining+NGEN
    This PR (6063) - mean (766ms)  : 755, 777
     .   : milestone, 766,
    master - mean (765ms)  : 750, 780
     .   : milestone, 765,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6063) - mean (92ms)  : 90, 94
     .   : milestone, 92,
    master - mean (91ms)  : 89, 93
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (6063) - mean (726ms)  : 708, 745
     .   : milestone, 726,
    master - mean (721ms)  : 705, 738
     .   : milestone, 721,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6063) - mean (190ms)  : 187, 194
     .   : milestone, 190,
    master - mean (190ms)  : 187, 194
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (6063) - mean (1,196ms)  : 1170, 1221
     .   : milestone, 1196,
    master - mean (1,193ms)  : 1174, 1212
     .   : milestone, 1193,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6063) - mean (276ms)  : 272, 279
     .   : milestone, 276,
    master - mean (276ms)  : 271, 280
     .   : milestone, 276,

    section CallTarget+Inlining+NGEN
    This PR (6063) - mean (940ms)  : 924, 956
     .   : milestone, 940,
    master - mean (938ms)  : 915, 961
     .   : milestone, 938,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6063) - mean (265ms)  : 262, 268
     .   : milestone, 265,
    master - mean (264ms)  : 261, 268
     .   : milestone, 264,

    section CallTarget+Inlining+NGEN
    This PR (6063) - mean (926ms)  : 902, 949
     .   : milestone, 926,
    master - mean (921ms)  : 905, 937
     .   : milestone, 921,

Loading

@andrewlock

Copy link
Copy Markdown
Member

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6063) (10.947M)   : 0, 10946829
    master (11.116M)   : 0, 11115802
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (6063) (7.341M)   : 0, 7341122
    master (7.421M)   : 0, 7420885
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.731M)   : 0, 7731186

    section Manual
    master (11.004M)   : 0, 11003658

    section Manual + Automatic
    This PR (6063) (6.766M)   : 0, 6765987
    master (6.830M)   : 0, 6830012

    section DD_TRACE_ENABLED=0
    master (10.198M)   : 0, 10198361

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6063) (9.614M)   : 0, 9613788
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (6063) (6.570M)   : 0, 6569901

    section Manual + Automatic
    This PR (6063) (6.016M)   : 0, 6015653

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6063) (10.182M)   : 0, 10181840
    master (9.921M)   : 0, 9920740
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (6063) (6.857M)   : 0, 6857301
    master (6.723M)   : 0, 6723182
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.251M)   : 0, 7251040

    section Manual
    master (9.883M)   : 0, 9883308

    section Manual + Automatic
    This PR (6063) (6.424M)   : 0, 6423568
    master (6.144M)   : 0, 6143502

    section DD_TRACE_ENABLED=0
    master (9.467M)   : 0, 9466504

Loading

@andrewlock

Copy link
Copy Markdown
Member

Benchmarks Report for tracer 🐌

Benchmarks for #6063 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.126
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.66μs 43.5ns 302ns 0.0158 0.00792 0 5.43 KB
master StartStopWithChild netcoreapp3.1 9.67μs 54.1ns 375ns 0.024 0.00959 0 5.61 KB
master StartStopWithChild net472 16.3μs 68.3ns 265ns 1.01 0.295 0.104 6.06 KB
#6063 StartStopWithChild net6.0 7.69μs 43.1ns 269ns 0.0147 0.00734 0 5.43 KB
#6063 StartStopWithChild netcoreapp3.1 9.73μs 49.3ns 226ns 0.0188 0.0094 0 5.62 KB
#6063 StartStopWithChild net472 16.1μs 51.3ns 199ns 1.01 0.285 0.0815 6.07 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 464μs 367ns 1.42μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 636μs 358ns 1.39μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 842μs 720ns 2.79μs 0.417 0 0 3.3 KB
#6063 WriteAndFlushEnrichedTraces net6.0 455μs 338ns 1.31μs 0 0 0 2.7 KB
#6063 WriteAndFlushEnrichedTraces netcoreapp3.1 638μs 416ns 1.61μs 0 0 0 2.7 KB
#6063 WriteAndFlushEnrichedTraces net472 834μs 727ns 2.72μs 0.417 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 207μs 1.2μs 9.59μs 0.205 0 0 18.45 KB
master SendRequest netcoreapp3.1 233μs 1.33μs 9.79μs 0.227 0 0 20.61 KB
master SendRequest net472 0.00333ns 0.00068ns 0.00263ns 0 0 0 0 b
#6063 SendRequest net6.0 219μs 1.49μs 14.4μs 0.216 0 0 18.45 KB
#6063 SendRequest netcoreapp3.1 234μs 1.35μs 11.1μs 0.231 0 0 20.61 KB
#6063 SendRequest net472 0.00208ns 0.000759ns 0.00294ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 564μs 2.94μs 15.6μs 0.561 0 0 41.46 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 763μs 4.38μs 34.7μs 0.372 0 0 41.69 KB
master WriteAndFlushEnrichedTraces net472 852μs 3.16μs 11.4μs 8.25 2.6 0.434 53.26 KB
#6063 WriteAndFlushEnrichedTraces net6.0 565μs 2.14μs 7.4μs 0.285 0 0 41.58 KB
#6063 WriteAndFlushEnrichedTraces netcoreapp3.1 703μs 2.99μs 11.6μs 0.332 0 0 41.7 KB
#6063 WriteAndFlushEnrichedTraces net472 851μs 4.19μs 19.2μs 8.62 2.59 0.431 53.32 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.35μs 1.2ns 4.66ns 0.0143 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.82μs 1.23ns 4.78ns 0.0136 0 0 1.02 KB
master ExecuteNonQuery net472 2.06μs 2.64ns 9.86ns 0.157 0 0 987 B
#6063 ExecuteNonQuery net6.0 1.38μs 1.63ns 6.31ns 0.0144 0 0 1.02 KB
#6063 ExecuteNonQuery netcoreapp3.1 1.87μs 1.69ns 6.53ns 0.014 0 0 1.02 KB
#6063 ExecuteNonQuery net472 2.13μs 2.34ns 9.07ns 0.156 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.18μs 3.3ns 12.8ns 0.0138 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.48μs 0.775ns 3ns 0.0126 0 0 976 B
master CallElasticsearch net472 2.48μs 2.37ns 9.17ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.21μs 0.577ns 2.16ns 0.0134 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.62μs 1.2ns 4.63ns 0.0137 0 0 1.02 KB
master CallElasticsearchAsync net472 2.63μs 4.68ns 18.1ns 0.167 0 0 1.05 KB
#6063 CallElasticsearch net6.0 1.25μs 0.601ns 2.33ns 0.0137 0 0 976 B
#6063 CallElasticsearch netcoreapp3.1 1.53μs 1.06ns 3.97ns 0.0131 0 0 976 B
#6063 CallElasticsearch net472 2.6μs 2.02ns 7.82ns 0.158 0 0 995 B
#6063 CallElasticsearchAsync net6.0 1.35μs 0.652ns 2.44ns 0.0135 0 0 952 B
#6063 CallElasticsearchAsync netcoreapp3.1 1.64μs 1.11ns 4.01ns 0.014 0 0 1.02 KB
#6063 CallElasticsearchAsync net472 2.54μs 6.59ns 25.5ns 0.167 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.21μs 1.64ns 6.12ns 0.0134 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.66μs 0.957ns 3.7ns 0.0124 0 0 952 B
master ExecuteAsync net472 1.81μs 0.742ns 2.87ns 0.145 0 0 915 B
#6063 ExecuteAsync net6.0 1.26μs 0.433ns 1.68ns 0.0132 0 0 952 B
#6063 ExecuteAsync netcoreapp3.1 1.6μs 0.892ns 3.34ns 0.0127 0 0 952 B
#6063 ExecuteAsync net472 1.77μs 1.03ns 3.97ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.41μs 1.88ns 7.04ns 0.0307 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.01μs 1.37ns 5.3ns 0.0352 0 0 2.76 KB
master SendAsync net472 7.87μs 1.61ns 6.23ns 0.499 0 0 3.15 KB
#6063 SendAsync net6.0 4.25μs 2.26ns 8.74ns 0.0316 0 0 2.22 KB
#6063 SendAsync netcoreapp3.1 5.25μs 2.06ns 7.99ns 0.0367 0 0 2.76 KB
#6063 SendAsync net472 7.77μs 2.18ns 8.46ns 0.497 0 0 3.15 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.45μs 1.07ns 4ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.21μs 1.64ns 6.13ns 0.0221 0 0 1.64 KB
master EnrichedLog net472 2.67μs 1.32ns 4.95ns 0.249 0 0 1.57 KB
#6063 EnrichedLog net6.0 1.54μs 7.01ns 27.1ns 0.0235 0 0 1.64 KB
#6063 EnrichedLog netcoreapp3.1 2.28μs 1.54ns 5.95ns 0.0227 0 0 1.64 KB
#6063 EnrichedLog net472 2.53μs 1.32ns 5.11ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 114μs 90.3ns 350ns 0 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 118μs 131ns 509ns 0 0 0 4.28 KB
master EnrichedLog net472 146μs 118ns 442ns 0.656 0.219 0 4.46 KB
#6063 EnrichedLog net6.0 113μs 101ns 363ns 0.0564 0 0 4.28 KB
#6063 EnrichedLog netcoreapp3.1 118μs 158ns 612ns 0.0594 0 0 4.28 KB
#6063 EnrichedLog net472 146μs 172ns 668ns 0.653 0.218 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.11μs 1.14ns 4.41ns 0.0312 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.29μs 1.86ns 7.22ns 0.0298 0 0 2.2 KB
master EnrichedLog net472 4.8μs 2.17ns 8.41ns 0.319 0 0 2.02 KB
#6063 EnrichedLog net6.0 3.11μs 1.12ns 3.89ns 0.031 0 0 2.2 KB
#6063 EnrichedLog netcoreapp3.1 4.14μs 1.86ns 7.22ns 0.029 0 0 2.2 KB
#6063 EnrichedLog net472 4.9μs 1.56ns 6.05ns 0.32 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.32μs 0.926ns 3.47ns 0.0158 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.78μs 0.683ns 2.65ns 0.0151 0 0 1.14 KB
master SendReceive net472 2.08μs 0.68ns 2.45ns 0.183 0 0 1.16 KB
#6063 SendReceive net6.0 1.29μs 0.47ns 1.69ns 0.0161 0 0 1.14 KB
#6063 SendReceive netcoreapp3.1 1.89μs 1.35ns 5.22ns 0.0151 0 0 1.14 KB
#6063 SendReceive net472 2μs 0.624ns 2.42ns 0.183 0.000999 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.73μs 1.13ns 4.22ns 0.0218 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.89μs 1.83ns 6.32ns 0.0216 0 0 1.65 KB
master EnrichedLog net472 4.32μs 3.45ns 13.4ns 0.322 0 0 2.04 KB
#6063 EnrichedLog net6.0 2.59μs 1.24ns 4.81ns 0.0219 0 0 1.6 KB
#6063 EnrichedLog netcoreapp3.1 4.01μs 1.86ns 7.21ns 0.0221 0 0 1.65 KB
#6063 EnrichedLog net472 4.47μs 2.77ns 10.7ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6063

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.126 482.94 543.58

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 406ns 0.0939ns 0.364ns 0.00797 0 0 576 B
master StartFinishSpan netcoreapp3.1 540ns 0.288ns 1.12ns 0.00786 0 0 576 B
master StartFinishSpan net472 610ns 0.36ns 1.39ns 0.0916 0 0 578 B
master StartFinishScope net6.0 483ns 0.89ns 3.45ns 0.00977 0 0 696 B
master StartFinishScope netcoreapp3.1 745ns 0.526ns 2.04ns 0.00935 0 0 696 B
master StartFinishScope net472 888ns 0.845ns 3.16ns 0.104 0 0 658 B
#6063 StartFinishSpan net6.0 404ns 0.467ns 1.68ns 0.00818 0 0 576 B
#6063 StartFinishSpan netcoreapp3.1 558ns 1.15ns 4.32ns 0.00787 0 0 576 B
#6063 StartFinishSpan net472 672ns 0.319ns 1.23ns 0.0916 0 0 578 B
#6063 StartFinishScope net6.0 544ns 1.08ns 4.17ns 0.00982 0 0 696 B
#6063 StartFinishScope netcoreapp3.1 679ns 0.512ns 1.77ns 0.00944 0 0 696 B
#6063 StartFinishScope net472 867ns 0.727ns 2.81ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 583ns 0.579ns 2.24ns 0.00969 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 992ns 1.12ns 4.33ns 0.00931 0 0 696 B
master RunOnMethodBegin net472 1.11μs 4.25ns 16.5ns 0.104 0 0 658 B
#6063 RunOnMethodBegin net6.0 594ns 0.357ns 1.38ns 0.00981 0 0 696 B
#6063 RunOnMethodBegin netcoreapp3.1 1.02μs 0.429ns 1.61ns 0.00935 0 0 696 B
#6063 RunOnMethodBegin net472 1.1μs 0.313ns 1.13ns 0.104 0 0 658 B

@tonyredondo
tonyredondo merged commit 2340cff into master Sep 23, 2024
@tonyredondo
tonyredondo deleted the tony/civisibility-avoid-failing-unfinished-tests branch September 23, 2024 18:27
@github-actions github-actions Bot added this to the vNext-v3 milestone Sep 23, 2024
@andrewlock andrewlock added the type:enhancement Improvement to an existing feature label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci-visibility type:enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants