From 07ff4bbac99618d0d727469feef7adc1c026e446 Mon Sep 17 00:00:00 2001 From: tedbullock Date: Sat, 17 Nov 2007 00:50:56 +0000 Subject: [PATCH] Print libevent version with -V option --- httperf/ChangeLog | 1 + httperf/src/httperf.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/httperf/ChangeLog b/httperf/ChangeLog index fd665ab..9242f17 100755 --- a/httperf/ChangeLog +++ b/httperf/ChangeLog @@ -1,6 +1,7 @@ 2007-11-16 Ted Bullock * configure.ac: Enable libevent dependancy + * src/httperf.c: Print libevent version event notification mechanism 2007-11-15 Ted Bullock diff --git a/httperf/src/httperf.c b/httperf/src/httperf.c index 469de42..110747e 100755 --- a/httperf/src/httperf.c +++ b/httperf/src/httperf.c @@ -67,6 +67,11 @@ #include #include +/* + * libevent api + */ +#include + #include #include #include @@ -235,6 +240,11 @@ main(int argc, char **argv) int numRates = 0; + /* + * Initialize libevent + */ + event_init(); + #ifdef __FreeBSD__ /* * This works around a bug in earlier versions of FreeBSD that cause @@ -874,7 +884,11 @@ main(int argc, char **argv) "out" #endif " TIME_SYSCALLS.\n", prog_name); - break; + printf + ("Using libevent-%s for %s event notification system.\n", + event_get_version(), event_get_method()); + + exit(0); case 'h': usage();