Alanxtl opened a new issue, #3391: URL: https://github.com/apache/dubbo-go/issues/3391
### Background `common.URL` is a core data structure used by config, registry, directory, protocol, router, and invoker paths. Before optimizing URL internals, we should add focused benchmarks so future changes can be evaluated with allocation and throughput data instead of intuition. Related to #3248. ### Scope Add URL-specific benchmarks covering the common hot paths: - `URL.String()` - `URL.Key()` - `URL.GetCacheInvokerMapKey()` - `URL.ServiceKey()` - `URL.Clone()` / `URL.CloneWithFilter()` - `URL.MergeURL()` - `URL.CopyParams()` / `URL.GetParams()` - `URL.IsEquals()` / `URL.ToMap()` Benchmarks should include small and larger parameter sets, for example `0`, `5`, `20`, and `100` params, and at least one case with `SubURL` so clone-related costs are visible. ### Acceptance criteria - Add focused benchmarks under `common` without changing production behavior. - Benchmark command is documented in the PR description, for example: ```bash go test ./common -bench 'BenchmarkURL' -benchmem ``` - The PR records baseline benchmark output so follow-up optimization PRs can compare against it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
