You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/10/06 11:44:59 UTC
[GitHub] [lucene-solr] noblepaul commented on a change in pull request #1951: SOLR-14691: Reduce object creation by using MapWriter / IteratorWriter.
noblepaul commented on a change in pull request #1951:
URL: https://github.com/apache/lucene-solr/pull/1951#discussion_r500206089
##########
File path: solr/core/src/java/org/apache/solr/util/stats/MetricUtils.java
##########
@@ -385,10 +406,10 @@ static double nsToMs(boolean convert, double value) {
}
// some snapshots represent time in ns, other snapshots represent raw values (eg. chunk size)
- static void addSnapshot(Map<String, Object> response, Snapshot snapshot, PropertyFilter propertyFilter, boolean ms) {
+ static void addSnapshot(MapWriter.EntryWriter ew, Snapshot snapshot, PropertyFilter propertyFilter, boolean ms) {
BiConsumer<String, Object> filter = (k, v) -> {
if (propertyFilter.accept(k)) {
Review comment:
I see this pattern repeated in many places. I think a helper method can be added to avoid code duplication
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org