[
https://issues.apache.org/jira/browse/ARTEMIS-1185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16028610#comment-16028610
]
ASF GitHub Bot commented on ARTEMIS-1185:
-----------------------------------------
Github user michaelandrepearce commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1295#discussion_r118982620
--- Diff:
artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java
---
@@ -288,7 +266,14 @@ private void flush(final boolean force) {
buffer.getBytes(0, bufferToFlush);
final List<IOCallback> ioCallbacks = callbacks == null ?
Collections.emptyList() : callbacks;
- bufferObserver.flushBuffer(bufferToFlush, pendingSyncs.get() >
0, ioCallbacks);
+
+ final boolean requiredSync = pendingSyncs.get() > 0;
+ this.flushProfiler.onStartFlush(bufferToFlush.position(),
requiredSync);
--- End diff --
why not a guard statement here? so if disabled the JVM would simply compile
out the code when disabled.
> Inter-Process Journal Sampler Profiler + CLI command
> ----------------------------------------------------
>
> Key: ARTEMIS-1185
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1185
> Project: ActiveMQ Artemis
> Issue Type: New Feature
> Components: Broker
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Minor
>
> It provides a sampling profiler on buffered ASYNCIO/NIO based journals.
> The profiling has a minimal cost in term of CPU time for each sample (the
> dominant costs are System.nanoTime() and a single cache line invalidation)
> and total memory footprint (~OS page size in bytes).
> A proper CLI command activates a sampler to collect (ie CSV) the profiled
> data, showing the precision of the sampling: data loss is not considered a
> failure condition.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)