2
* OpenVPN -- An application to securely tunnel IP networks
3
* over a single TCP/UDP port, with support for SSL/TLS-based
4
* session authentication and key exchange,
5
* packet encryption, packet authentication, and
8
* Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License version 2
12
* as published by the Free Software Foundation.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program (see the file COPYING included with this
21
* distribution); if not, write to the Free Software Foundation, Inc.,
22
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
* The interval_ routines are designed to optimize the calling of a routine
27
* (normally tls_multi_process()) which can be called less frequently
34
/*#define ENABLE_PERFORMANCE_METRICS*/
39
#define PERF_BIO_READ_PLAINTEXT 0
40
#define PERF_BIO_WRITE_PLAINTEXT 1
41
#define PERF_BIO_READ_CIPHERTEXT 2
42
#define PERF_BIO_WRITE_CIPHERTEXT 3
43
#define PERF_TLS_MULTI_PROCESS 4
44
#define PERF_IO_WAIT 5
45
#define PERF_EVENT_LOOP 6
46
#define PERF_MULTI_CREATE_INSTANCE 7
47
#define PERF_MULTI_CLOSE_INSTANCE 8
48
#define PERF_MULTI_SHOW_STATS 9
49
#define PERF_MULTI_BCAST 10
50
#define PERF_MULTI_MCAST 11
51
#define PERF_SCRIPT 12
52
#define PERF_READ_IN_LINK 13
53
#define PERF_PROC_IN_LINK 14
54
#define PERF_READ_IN_TUN 15
55
#define PERF_PROC_IN_TUN 16
56
#define PERF_PROC_OUT_LINK 17
57
#define PERF_PROC_OUT_TUN 18
58
#define PERF_PROC_OUT_TUN_MTCP 19
61
#ifdef ENABLE_PERFORMANCE_METRICS
70
void perf_push (int type);
72
void perf_output_results (void);
76
static inline void perf_push (int type) {}
77
static inline void perf_pop (void) {}
78
static inline void perf_output_results (void) {}