Rx: only compute peer bytes sent and received if rx_stats_active
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 19 Sep 2010 16:47:37 +0000 (09:47 -0700)
committerDerrick Brashear <shadow@dementia.org>
Mon, 20 Sep 2010 08:53:13 +0000 (01:53 -0700)
commit7d16c8b84ac8cc0251231819bfb0eefc2040322a
tree2637ea4cb1b7314e115316e1825a781cedf0b076
parentc59ce29602086f795d5fbaef6a5f88fae9dd2dea
Rx: only compute peer bytes sent and received if rx_stats_active

Computing the bytes sent and received is an expensive operation.
If rx statistics collection has been disabled we should not collect
the peer data.  The most expensive operation is the rx_FindPeer()
call that is performed during rxi_ReadPacket().  rxi_ReadPacket()
is processed by the rx listener thread which must be as fast as
possible.

Change-Id: I5403c88aa85f9049fe50a9c1f3dbaad7d8b802bd
Reviewed-on: http://gerrit.openafs.org/2782
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx_packet.c