Skip to content

feat: improved client performance when Bypasser is disabled#64

Merged
petruki merged 1 commit into
masterfrom
staging
Jul 11, 2026
Merged

feat: improved client performance when Bypasser is disabled#64
petruki merged 1 commit into
masterfrom
staging

Conversation

@petruki

@petruki petruki commented Jul 11, 2026

Copy link
Copy Markdown
Member

This pull request updates the package version from 1.2.0 to 1.2.1 and introduces a safeguard to the Bypasser class to ensure key searching only occurs when bypassing is enabled. Below are the most important changes:

Version bump and workflow updates:

  • Updated __version__ in switcher_client/version.py, sonar.projectVersion in sonar-project.properties, and the workflow dispatch description in .github/workflows/publish-anaconda.yml to reflect version 1.2.1. [1] [2] [3]

Bypasser class enhancements:

  • Added a _bypass_enabled flag to the Bypasser class and set it to True when assume is called to explicitly control when bypassing is active.
  • Updated the search_key method to return None if bypassing is not enabled, preventing unintended key lookups when bypassing is disabled.

Performance results
Switcher Client SDK: Mean +- std dev: 377 ns +- 0 ns

Benchmark summary

Metric Value
SDK Switcher Client SDK
Time/iteration (avg) 377.30 ns
Iterations/s 2,650,386.73
Min 376.93 ns
Max 378.03 ns
p75 377.55 ns
p99 378.01 ns
p99.5 378.02 ns

@petruki petruki added this to the v1.2.1 milestone Jul 11, 2026
@petruki petruki self-assigned this Jul 11, 2026
@petruki petruki added the enhancement New feature or request label Jul 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

@petruki petruki merged commit 6c81541 into master Jul 11, 2026
27 of 28 checks passed
@petruki petruki deleted the staging branch July 11, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant