dsmiley commented on code in PR #4404:
URL: https://github.com/apache/solr/pull/4404#discussion_r3206284787
##########
solr/benchmark/src/java/org/apache/solr/bench/SolrBenchState.java:
##########
@@ -406,10 +407,12 @@ private void indexParallel(String collection, Docs docs,
int docCount)
new SolrNamedThreadFactory("SolrJMH Indexer Progress"));
scheduledExecutor.scheduleAtFixedRate(
() -> {
- if (meter.getCount() == docCount) {
+ long count = meterCount.get();
+ if (count == docCount) {
scheduledExecutor.shutdown();
} else {
- log(meter.getCount() + " docs at " + meter.getMeanRate() + "
doc/s");
+ double rate = count / ((System.nanoTime() - meterStartNanos) /
1e9);
Review Comment:
I'd prefer to see something that requires less trust in the time math as a
code reviewer... like some JDK API calls to produce a readable equivalent.
##########
solr/core/src/java/org/apache/solr/cloud/ZkDistributedQueue.java:
##########
Review Comment:
if we wanted to bring back such timings, I'd rather it be done with
annotations similar to tracing `@WithSpan`. Alas, OTEL has no metric
equivalent, which would be for something more light-weight that isn't
span-worthy. I think talking to ZK is span-worthy as it's another
process/system, albeit it's so fast that someone would typically prefer to
disable such. Ideally Spans would have levels like logging but they don't;
people have [proposed
it](https://github.com/open-telemetry/opentelemetry-specification/issues/3205).
I did see
[this](https://github.com/open-telemetry/opentelemetry-specification/pull/3877)
interesting development, which is somewhat related as it allows disabling spans
for an entire "scope".
--
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]