Skip to content

Add reproducible native core performance benchmarks - #131

Merged
andre487 merged 1 commit into
mainfrom
native-benchmarks
Oct 27, 2026
Merged

andre487 merged 1 commit into
mainfrom
native-benchmarks

Conversation

@andre487

@andre487 andre487 commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Pull request stack

GitHub stack #135.

Merge order: #131 → #132 → #133.

Base: main. Each PR contains only its own change relative to its parent. After merging lower layers, use gh stack sync to update local tracking and restack the remaining branches.

Changes

Add reproducible host benchmarks to compare Go-side source-validation costs with validation disabled, standard caching and advanced per-datagram checks. Cover UDP Read/ReadFrom across payload sizes, cache expiry, TCP/UDP admission and IPv4/IPv6 packet filtering; retain the existing SOCKS5 allocation benchmark in the default suite.

bundle exec fastlane android native_benchmarks saves ten samples per scenario, allocation metrics, ownership-query counts, exact arguments and environment/revision metadata. Options select workloads, sample duration/count, GOMAXPROCS and output directory. Optional CPU/allocation profiles retain the matching binary for pprof. Reusing an output directory clears previous benchmark/profile artifacts; an unmatched filter fails explicitly.

English/Russian documentation includes benchstat mode/revision comparisons and pprof commands. Benchmarks use local in-memory fixtures and do not contact public services or need credentials. The validator responds immediately: Android JNI/Binder/socket-owner lookup, actual VPN bandwidth and concurrent saturation are outside these measurements. Production networking code is unchanged; required CI does not gain timing thresholds.

Validation

  • All 315 native tests passed with the race detector.
  • Default suite completed 39 scenarios × 10 samples; UDP read cases reported zero allocations per operation and expected owner-query counts.
  • All scenarios passed a one-iteration smoke run through Fastlane.
  • Admission benchmarks passed a separate race-detector smoke run.
  • CPU and allocation profiles were generated and read with pprof; benchstat mode comparisons were exercised.
  • Reused-output cleanup verified; unmatched benchmark filters fail.

@andre487
andre487 added this pull request to stack #134 October 27, 2026 15:42
@andre487
andre487 removed this pull request from stack #134 October 27, 2026 15:49
@andre487
andre487 added this pull request to stack #135 October 27, 2026 15:50
@andre487
andre487 merged commit d3f5644 into main Oct 27, 2026
14 of 15 checks passed
@andre487
andre487 deleted the native-benchmarks branch October 27, 2026 15:51
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.

1 participant