2 // Copyright (c) 2010-2017 Intel Corporation
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef _STATS_GLOBAL_H_
18 #define _STATS_GLOBAL_H_
20 uint64_t stats_get_last_tsc(void);
22 struct global_stats_sample {
24 uint64_t host_rx_packets;
25 uint64_t host_tx_packets;
26 uint64_t nics_rx_packets;
27 uint64_t nics_tx_packets;
28 uint64_t nics_ierrors;
29 uint64_t nics_imissed;
32 void stats_global_reset(void);
33 void stats_global_init(unsigned avg_start, unsigned duration);
34 void stats_global_post_proc(void);
36 struct global_stats_sample *stats_get_global_stats(int last);
37 struct global_stats_sample *stats_get_global_stats_beg(void);
38 uint64_t stats_global_start_tsc(void);
39 uint64_t stats_global_beg_tsc(void);
40 uint64_t stats_global_end_tsc(void);
42 #endif /* _STATS_GLOBAL_H_ */