File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,15 @@ Span Tracer::create_span(const SpanConfig& config) {
170170 auto defaults = config_manager_->span_defaults ();
171171 auto span_data = std::make_unique<SpanData>();
172172 span_data->apply_config (*defaults, config, clock_);
173+
174+ // PERFORMANCE REGRESSION: Add expensive computation to simulate heavy workload
175+ // This will cause significant performance degradation in span creation
176+ volatile std::uint64_t regression_work = 0 ;
177+ for (int i = 0 ; i < 1000000 ; ++i) {
178+ regression_work += (i * i) % 997 ; // Use a prime modulus for more work
179+ regression_work += regression_work * 31 ; // Additional computation
180+ }
181+
173182 span_data->trace_id = generator_->trace_id (span_data->start );
174183 span_data->span_id = span_data->trace_id .low ;
175184 span_data->parent_id = 0 ;
You can’t perform that action at this time.
0 commit comments