opcensus

command
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Command opcensus counts each service's List/Describe/Get operations for gopherstack-6flj (see services/_WRAPPER_KEY_SWEEP_REMAINDER.md).

The notes on 6flj recorded per-service remainders that turned out wrong twice, each time by a large factor (ec2 "~144" vs. the real ~220+; rds "130+ remaining" vs. the real 26), both times because the wrong number was carried forward instead of being read from the service's own operation list. This tool reads that list directly: for each services/<dir>, it parses every non-test .go file, locates the GetSupportedOperations method (every service implements it; it is the dispatcher's own declared operation set, not a doc comment or a guess), and collects the string literals it returns -- following same-package function and method calls it makes (ec2 delegates through two helper functions; omics delegates through a dispatch-table constructor), resolving named consts used as map keys or table entries in place of literal strings, and, where the field it reads is only ever populated indirectly -- assigned in a constructor from a same-package method call, or threaded through an intermediate local variable (`keys := collections.SortedKeys(h.ops)`) -- chasing that assignment wherever it lives in the package (resolveName/chaseExpr/chaseCall).

This counts what each service's own dispatcher claims to support, then buckets by List/Describe/Get prefix -- a proxy for "collection or nested-shape response surface," the shape of bug this issue tracks. It says nothing about whether any individual op is correct; that is still a per-op hand read against the pinned SDK deserializer.

gopherstack-c7s3 / gopherstack-jq8x: a service whose op count could not be resolved used to print as a bare 0 -- indistinguishable from a real small, clean service, which is exactly how ssm and route53resolver went unnoticed. Any service whose SDK module or op list can't be resolved now prints as an explicit ERROR row instead, and the process exits non-zero, so a silent zero is no longer possible: it is either a verified count or a loud failure.

Usage:

go run ./cmd/opcensus                # ranked summary to stdout
go run ./cmd/opcensus -json out.json # full per-service detail

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL