Patent ID: 8792366

Claim:
A method comprising: at a network device having a memory, storing a first time value indicating when an ingress port of the network device received a packet; storing a second time value indicating when an egress port of the network device received the packet for transmission towards another network device; storing a difference between the first time value and the second time value; and storing one or more metrics, the one or more metrics comprising one or more of: a value indicating a minimum packet latency measured for the egress port; a value indicating a maximum packet latency measured for the egress port; a value indicating an accumulated total of measured packet latencies for the egress port; a value indicating a quantity of packets measured for latency; a value indicating a high packet latency threshold; a value indicating a quantity of packets measured for latency whose measured latency value is greater than the high packet latency threshold; and a value indicating whether to store packets having measured packet latencies greater than the high packet latency threshold, wherein the method is performed on the packets received at the ingress port at a predetermined sampling frequency, and wherein the predetermined sampling frequency is changed based at least in part proportionally to a service level agreement (SLA).