lewismc opened a new pull request, #871: URL: https://github.com/apache/nutch/pull/871
This PR implements Phase 1 of the Nutch metrics improvements: creating a centralized `NutchMetrics` constants class, caching counter references in hot paths, and standardizing naming conventions across the codebase following [Prometheus naming best practices](https://prometheus.io/docs/practices/naming/). In `FetcherThread.java`, counters are now cached to avoid repeated `context.getCounter()` lookups in the fetch loop: ``` // Before: looked up on every fetch context.getCounter("FetcherStatus", "robots_denied").increment(1); // After: cached reference, initialized once robotsDeniedCounter.increment(1); ``` Any feedback appreciated. -- 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]

