• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aserto-dev / topaz / 27625772769
7%

Build:
DEFAULT BRANCH: main
Ran 16 Jun 2026 02:44PM UTC
Jobs 1
Files 140
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jun 2026 02:42PM UTC coverage: 7.355% (-0.009%) from 7.364%
27625772769

push

github

web-flow
service/builder: use grpc.NumStreamWorkers for fixed goroutine pool (#725)

* authorizer: cache PreparedEvalQuery per (policy path, decisions)

Each Is() call rebuilds a rego.PreparedEvalQuery from the runtime's
compiler and store, including ast.ParseBody / ast.ParseRef for the
query body. Under concurrent load this fights the OPA compiler's
internal locks and burns CPU on duplicate parsing.

Memoize the prepared query keyed on (policy_context.path,
policy_context.decisions). The compiler/store/policy bundle are stable
between bundle reloads, so the prepared query is reusable. Invalidation
is wired up via plugins.Manager.RegisterCompilerTrigger, which fires
on bundle activation / discovery update / any compiler rotation.

Concurrency-safe: sync.Map for read-mostly access, golang.org/x/sync
singleflight to collapse concurrent misses on the same key into one
PrepareForEval call.

Measured against a stub iap.egress.http policy, native Go gRPC client
(port 8282), Apple M-series Mac. Median of 3 back-to-back 3-second runs
after a 100-call warmup:

    conc | before rps | after rps | gain
    -----+------------+-----------+------
       1 |     7,803  |   11,517  | +48%
       4 |    18,474  |   28,831  | +56%
       8 |    23,880  |   37,572  | +57%
      16 |    29,929  |   46,980  | +57%

p50 latency drops correspondingly (e.g. conc=1: 113 µs -> 77 µs;
conc=16: 522 µs -> 301 µs). Decisions are byte-identical to the
unmodified path.

Tests:
- TestCacheKey: key derivation is order-sensitive on the decisions
  list and stable across runs.
- TestGetOrPrepare_CachesAndDedupes: factory runs at most once across
  200 concurrent goroutines for the same key; subsequent calls hit
  the cache without invoking the factory.
- TestGetOrPrepare_FactoryError: factory errors are propagated and
  not cached, so transient failures don't poison the cache.

* service/builder: use grpc.NumStreamWorkers for fixed goroutine pool

The default grpc-go server spawns a fresh gorout... (continued)

0 of 12 new or added lines in 1 file covered. (0.0%)

739 of 10047 relevant lines covered (7.36%)

0.08 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
0.0
0.0% topazd/service/builder/service_factory.go
Jobs
ID Job ID Ran Files Coverage
1 27625772769.1 16 Jun 2026 02:44PM UTC 140
7.36
GitHub Action Run
Source Files on build 27625772769
  • Tree
  • List 140
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 4f5ab2f3 on github
  • Prev Build on main (#27536053969)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc