Mercurial > hg > freeDiameter
diff tests/tests.h @ 1090:8be95f757b08
Improved the testmesg_stress with more functions tested and configurable number of samples.
Example of output: ./testmesg_stress -p 1000000
fd_msg_parse_buffer: 1000000 buffers parsed in 2.097266s (476811.2msg/s)
fd_msg_parse_dict : 1000000 messages parsed in 4.320338s (231463.4msg/s)
fd_msg_parse_rules : 1000000 messages parsed in 3.217548s (310795.7msg/s)
new_answer(normal) : 1000000 messages created in 1.623253s (616046.8msg/s)
new_answer(error) : 1000000 messages created in 1.325757s (754286.2msg/s)
fd_msg_bufferize : 1000000 buffers created in 2.619448s (381759.8msg/s)
fd_msg_free : 1000000 messages freed in 1.820525s (549292.0msg/s)
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Mon, 06 May 2013 10:29:31 +0800 |
parents | 1d1a20a0779d |
children | d8591b1c56cd |
line wrap: on
line diff
--- a/tests/tests.h Sat May 04 21:33:56 2013 +0200 +++ b/tests/tests.h Mon May 06 10:29:31 2013 +0800 @@ -140,11 +140,12 @@ } static int gnutls_debug = 0; +static int test_parameter = 0; static inline void parse_cmdline(int argc, char * argv[]) { int c; int no_timeout = 0; - while ((c = getopt (argc, argv, "dqnf:F:g:")) != -1) { + while ((c = getopt (argc, argv, "dqnf:F:g:p:")) != -1) { switch (c) { case 'd': /* Increase verbosity of debug messages. */ fd_g_debug_lvl--; @@ -178,6 +179,10 @@ gnutls_debug = (int)atoi(optarg); break; + case 'p': /* Set a debug level and function for GNU TLS calls. */ + test_parameter = (int)atoi(optarg); + break; + default: /* bug: option not considered. */ return; }