Skip to content

[#1984] Refactor use of deprecated StatsImpl.addStatistic to use addStatistics(Set.of(..))#1985

Open
mattrpav wants to merge 1 commit intoapache:mainfrom
mattrpav:amq-gh-1984
Open

[#1984] Refactor use of deprecated StatsImpl.addStatistic to use addStatistics(Set.of(..))#1985
mattrpav wants to merge 1 commit intoapache:mainfrom
mattrpav:amq-gh-1984

Conversation

@mattrpav
Copy link
Copy Markdown
Contributor

@mattrpav mattrpav commented May 2, 2026

No description provided.

addStatistic("dequeues", dequeues);
addStatistic("inflightMessageSize", inflightMessageSize);

addStatistics(Set.of(consumedCount, enqueues, dispatched, inflightMessageSize));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should iniclude dequeueshere:

Suggested change
addStatistics(Set.of(consumedCount, enqueues, dispatched, inflightMessageSize));
addStatistics(Set.of(consumedCount, enqueues, dispatched, dequeues, inflightMessageSize));

addStatistic("enqueues", enqueues);
addStatistic("dequeues", dequeues);
addStatistic("receivedCount", receivedCount);
addStatistics(Set.of(enqueues, dequeues, receivedCount));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
addStatistics(Set.of(enqueues, dequeues, receivedCount));
addStatistics(Set.of(enqueues, dequeues, receivedCount));

addStatistic("writeTime", writeTime);
addStatistic("readTime", readTime);

addStatistics(Set.of(slowCleanupTime, slowWriteTime, slowReadTime, writeTime, readTime));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
addStatistics(Set.of(slowCleanupTime, slowWriteTime, slowReadTime, writeTime, readTime));
addStatistics(Set.of(slowCleanupTime, slowWriteTime, slowReadTime, writeTime, readTime));

import org.apache.activemq.management.StatsImpl;
import org.apache.activemq.management.TimeStatisticImpl;

import java.util.Set;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: usually this import should be beofre the org.apache.activemq (same on the other classes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants