Thomas Vachuska | 924cda4 | 2015-09-22 12:11:27 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Thomas Vachuska | 924cda4 | 2015-09-22 12:11:27 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package org.onosproject.net.packet; |
| 17 | |
| 18 | /** |
| 19 | * Packet processor entry tracking the processor, its priority and |
| 20 | * time consumption. |
| 21 | */ |
| 22 | public interface PacketProcessorEntry { |
| 23 | |
| 24 | /** |
| 25 | * Returns the packet processor. |
| 26 | * |
| 27 | * @return packet processor |
| 28 | */ |
| 29 | PacketProcessor processor(); |
| 30 | |
| 31 | /** |
| 32 | * Returns the packet processor priority. |
| 33 | * |
| 34 | * @return processor priority |
| 35 | */ |
| 36 | int priority(); |
| 37 | |
| 38 | /** |
| 39 | * Returns the number of invocations. |
| 40 | * |
| 41 | * @return number of invocations |
| 42 | */ |
| 43 | long invocations(); |
| 44 | |
| 45 | /** |
| 46 | * Returns the total time, in nanoseconds, spent processing packets. |
| 47 | * |
| 48 | * @return total time in nanos |
| 49 | */ |
| 50 | long totalNanos(); |
| 51 | |
| 52 | /** |
| 53 | * Returns the average time, in nanoseconds, spent processing packets. |
| 54 | * |
| 55 | * @return average time in nanos |
| 56 | */ |
| 57 | long averageNanos(); |
| 58 | } |