Lower tracing overhead 26/22326/2
authorRobert Varga <rovarga@cisco.com>
Tue, 9 Jun 2015 23:38:42 +0000 (01:38 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 11 Jun 2015 08:33:05 +0000 (08:33 +0000)
commit4d268af5b4080d5d2f21db0ad260c09f9ce5b49b
tree4564a72d5502b5a798e871174aa2eb4c79ed0f33
parent7285892811352df6c4b1f5af4474f5efa37d2e89
Lower tracing overhead

Arrays.toString() and ByteBufUtil.hexDump() are expensive relative to an
disabled trace call. Guard the corresponding trace() calls with
LOG.isTraceEnabled(). Discovered in BGP performance traces to have some
4% overhead.

Change-Id: I94ce9b57b86bae9be35e5839447a19b268064469
Signed-off-by: Robert Varga <rovarga@cisco.com>
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/BGPOpenMessageParser.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/BGPUpdateMessageParser.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/open/CapabilityParameterParser.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPByteToMessageDecoder.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPMessageToByteEncoder.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/LocRibWriter.java