Skip to content

Instantly share code, notes, and snippets.

public final class ActiveMQBuffers {
private static final ByteBufAllocator ALLOCATOR;
static {
boolean usePool = Boolean.getBoolean(System.getProperty("org.apache.activemq.usePool", "true"));
ALLOCATOR = usePool ? PooledByteBufAllocator.DEFAULT : UnpooledByteBufAllocator.DEFAULT;
}
public void validatePluginMethodsAtLeast(int count, String... names) {
Arrays.asList(names).forEach(name -> {
try {
Wait.waitFor(() -> count <= methodCalls.getOrDefault(name, new AtomicInteger()).get());
} catch (Exception e) {
e.printStackTrace();
}
assertTrue("validating method " + name, count <= methodCalls.getOrDefault(name, new AtomicInteger()).get());
});
}
@Override
public ActiveMQBuffer createTransportBuffer(final int size) {
try {
return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true);
} catch (OutOfMemoryError oom) {
final long totalPendingWriteBytes = batchBufferSize(this.channel, this.writeBufferHighWaterMark);
ActiveMQClientLogger.LOGGER.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " +
"pendingWrites: [NETTY] -> " + totalPendingWriteBytes +
"[EVENT LOOP] -> " + pendingWritesOnEventLoopView.get() +
" causes: " + oom.getMessage(), oom);
[root@messaging-ci-02 quiver]# quiver q0 --m 100k --body-size 50k
---------------------- Sender ----------------------- --------------------- Receiver ---------------------- --------
Time [s] Count [m] Rate [m/s] CPU [%] RSS [M] Time [s] Count [m] Rate [m/s] CPU [%] RSS [M] Lat [ms]
----------------------------------------------------- ----------------------------------------------------- --------
2.2 3,291 1,644 98 203.6 2.1 2,391 1,194 73 22.3 503
4.2 7,172 1,938 99 203.8 4.1 6,363 1,984 100 22.3 442
6.2 10,795 1,810 98 204.4 6.1 9,963 1,798 90 22.3 448
8.2 13,867 1,534 100 204.4 8.1 13,217 1,625 84 22.3 435
10.2 17,963 2,046 100 204.4 10.1 16,831 1,805 91 22.3 433
12
92.3 198,999 2,260 76 548.9 92.2 198,991 2,274 96 1,909.1 0
94.3 203,646 2,321 78 548.9 94.2 203,542 2,273 97 1,906.1 0
96.3 208,047 2,198 78 548.9 96.2 207,992 2,223 95 1,904.0 0
98.3 212,571 2,260 78 548.9 98.2 212,543 2,274 97 1,903.0 0
100.3 217,095 2,260 86 548.9 100.2 216,993 2,223 95 1,900.4 0
102.3 221,619 2,260 74 548.9 102.2 221,544 2,273 96 1,897.9 0
104.3 226,021 2,199 73 548.9 104.2 225,893 2,172 96 1,895.3 0
106.3 230,422 2,198 77 548.9 106.2 230,343 2,223 98 1,895.3 2
108.3 234,824 2,199 79 549.0 108.2 234,7
----------------------------------------------------- ----------------------------------------------------- --------
2.2 0 0 81 115.0 2.1 0 0 78 106.1 0
4.2 0 0 31 135.0 4.1 0 0 34 132.1 0
6.2 0 0 25 156.4 6.1 0 0 27 154.7 0
8.2 0 0 25 181.1 8.1 0 0 22 178.7 0
10.2 0 0 16 200.0 10.1 106 53 18 203.2 26
12.2 129 64 20 225.4 12.1 106 0 16 222.4 0
14.2 129 0 11 246.0 14.1 106 0 12 243.3 0
16.2 129 0 10 264.5 16.1
--------------------------------------------------------------------------------
Subject: None q1 (/tmp/quiver-Orh8mt)
Messages: 1,000,000 messages
Body size: 100 bytes
Credit window: 1,000 messages
Duration: 36.8 s
Sender rate: 27,156 messages/s
Receiver rate: 27,153 messages/s
End-to-end rate: 27,151 messages/s
Average latency: 9.9 ms
ovpn-121-226:qpid-cpp-1.36.0 clebertsuconic$ cmake .
-- Build type is "RelWithDebInfo" (has debug symbols)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find VALGRIND (missing: VALGRIND_EXECUTABLE)
-- No need to generate AMQP protocol sources
-- No need to generate Qpid Management Framework sources
-- Can't locate the doxygen command; user documentation cannot be generated
-- Boost version: 1.63.0
-- Found the following Boost libraries:
-- program_options
git checkout $1
git fetch apache
git pull --rebase apache master
git checkout apache/master -B master
git merge --no-ff $1 -m "This closes #$*"
git branch -D $1
git fetch origin
git fetch apache
#git checkout apache/master -B master
git fetch upstream
git checkout upstream/pr/$1 -B $1