activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (ARTEMIS-1185) Inter-Process Journal Sampler Profiler + CLI command
Date Tue, 30 May 2017 07:00:15 GMT


ASF GitHub Bot commented on ARTEMIS-1185:

Github user franz1981 commented on a diff in the pull request:
    --- Diff: artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/
    @@ -93,10 +82,10 @@
        public TimedBuffer(final int size, final int timeout, final boolean logRates) {
           bufferSize = size;
    -      this.logRates = logRates;
           if (logRates) {
    -         logRatesTimer = new Timer(true);
    +         this.flushProfiler = Profiler.instrumented();
    +      } else {
    +         this.flushProfiler = Profiler.none();
    --- End diff --
    About the compiler we're "lucky", because the noop impl will be inlined (is monomorphic
with no code inside) and then wiped away (verified using JitWatch), leaving the TimedBuffer
clean and without null checks too.
    The guard statement that can be compiled out AFAIK are the ones that rely on final static
fields, while normal instance members do not receive the same treatment from the JIT, sadly.
    It is a different coding style: like having a null logger instance member or a noop logger

> Inter-Process Journal Sampler Profiler + CLI command
> ----------------------------------------------------
>                 Key: ARTEMIS-1185
>                 URL:
>             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

View raw message