[netperf-dev] netperf4 commit notice r33 - in trunk: . src
raj at netperf.org
raj at netperf.org
Fri Dec 9 11:20:23 PST 2005
Author: raj
Date: 2005-12-09 11:20:17 -0800 (Fri, 09 Dec 2005)
New Revision: 33
Added:
trunk/src/netperf_hist.h
Removed:
trunk/src/hist.h
Modified:
trunk/configure
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/Makefile.in
trunk/src/netperf.h
trunk/src/nettest_bsd.c
trunk/src/nettest_dns.c
trunk/src/nettest_vst.c
Log:
rename hist.h netperf_hist.h, make it an "installed" header file and
conditionally include it in netperf.h to simplify the test suite .c
files which were each including it on their own.
Modified: trunk/configure
===================================================================
--- trunk/configure 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/configure 2005-12-09 19:20:17 UTC (rev 33)
@@ -425,7 +425,6 @@
PACKAGE_STRING='netperf 4.0.0alpha2'
PACKAGE_BUGREPORT=''
-ac_unique_file="src/hist.h"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@@ -1626,7 +1625,7 @@
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
+# AC_CONFIG_SRCDIR([src/hist.h])
am__api_version="1.7"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -3652,7 +3651,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3655 "configure"' > conftest.$ac_ext
+ echo '#line 3654 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5216,7 +5215,7 @@
# Provide some information about the compiler.
-echo "$as_me:5219:" \
+echo "$as_me:5218:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6312,11 +6311,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6315: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6314: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6319: \$? = $ac_status" >&5
+ echo "$as_me:6318: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6574,11 +6573,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6577: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6576: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6581: \$? = $ac_status" >&5
+ echo "$as_me:6580: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6636,11 +6635,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6639: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6638: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6643: \$? = $ac_status" >&5
+ echo "$as_me:6642: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8888,7 +8887,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8891 "configure"
+#line 8890 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8986,7 +8985,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8989 "configure"
+#line 8988 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11239,11 +11238,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11242: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11241: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11246: \$? = $ac_status" >&5
+ echo "$as_me:11245: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11301,11 +11300,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11304: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11303: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11308: \$? = $ac_status" >&5
+ echo "$as_me:11307: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12686,7 +12685,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12689 "configure"
+#line 12688 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12784,7 +12783,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12787 "configure"
+#line 12786 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13669,11 +13668,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13672: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13671: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13676: \$? = $ac_status" >&5
+ echo "$as_me:13675: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13731,11 +13730,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13734: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13733: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13738: \$? = $ac_status" >&5
+ echo "$as_me:13737: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15872,11 +15871,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15875: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15874: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15879: \$? = $ac_status" >&5
+ echo "$as_me:15878: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16134,11 +16133,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16137: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16136: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16141: \$? = $ac_status" >&5
+ echo "$as_me:16140: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16196,11 +16195,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16199: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16198: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16203: \$? = $ac_status" >&5
+ echo "$as_me:16202: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18448,7 +18447,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 18451 "configure"
+#line 18450 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18546,7 +18545,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 18549 "configure"
+#line 18548 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/configure.ac 2005-12-09 19:20:17 UTC (rev 33)
@@ -10,7 +10,7 @@
AC_INIT(netperf, 4.0.0alpha2)
# use the target version rather than host - one day we may want cross-compile
AC_CANONICAL_TARGET
-AC_CONFIG_SRCDIR([src/hist.h])
+# AC_CONFIG_SRCDIR([src/hist.h])
AM_INIT_AUTOMAKE(netperf, 4.0.0alpha2)
AM_CONFIG_HEADER(config.h)
# AC_CONFIG_HEADER(config.h)
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/src/Makefile.am 2005-12-09 19:20:17 UTC (rev 33)
@@ -11,7 +11,7 @@
EXTRA_DIST = missing/* dirs NetPerf/* NetServer/* *.xml netperf_docs.dtd netperf.h netsysstats*.c
-COMMON_SRC = hist.h netlib.c netperf.h netlib.h netcpu.h netmsg.c netconfidence.c netconfidence.h
+COMMON_SRC = netperf_hist.h netlib.c netperf.h netlib.h netcpu.h netmsg.c netconfidence.c netconfidence.h
netperf_SOURCES = netperf.c $(COMMON_SRC)
netserver_SOURCES = netserver.c $(COMMON_SRC)
@@ -19,7 +19,7 @@
# in theory this will cause these header files to be put in the
# installed headers location, where folks who want to make their own
# test libraries can find them
-include_HEADERS = netperf.h netconfidence.h
+include_HEADERS = netperf.h netconfidence.h netperf_hist.h
# in theory, the stuff below should deal with creating the requisite libs
lib_LTLIBRARIES = nettest_bsd.la netsysstats.la nettest_dns.la nettest_vst.la
Modified: trunk/src/Makefile.in
===================================================================
--- trunk/src/Makefile.in 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/src/Makefile.in 2005-12-09 19:20:17 UTC (rev 33)
@@ -150,7 +150,7 @@
# directly in COMMON_SRC or *_SOURCES should be in EXTRA_DIST
EXTRA_DIST = missing/* dirs NetPerf/* NetServer/* *.xml netperf_docs.dtd netperf.h netsysstats*.c
-COMMON_SRC = hist.h netlib.c netperf.h netlib.h netcpu.h netmsg.c netconfidence.c netconfidence.h
+COMMON_SRC = netperf_hist.h netlib.c netperf.h netlib.h netcpu.h netmsg.c netconfidence.c netconfidence.h
netperf_SOURCES = netperf.c $(COMMON_SRC)
netserver_SOURCES = netserver.c $(COMMON_SRC)
@@ -158,7 +158,7 @@
# in theory this will cause these header files to be put in the
# installed headers location, where folks who want to make their own
# test libraries can find them
-include_HEADERS = netperf.h netconfidence.h
+include_HEADERS = netperf.h netconfidence.h netperf_hist.h
# in theory, the stuff below should deal with creating the requisite libs
lib_LTLIBRARIES = nettest_bsd.la netsysstats.la nettest_dns.la nettest_vst.la
Deleted: trunk/src/hist.h
===================================================================
--- trunk/src/hist.h 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/src/hist.h 2005-12-09 19:20:17 UTC (rev 33)
@@ -1,136 +0,0 @@
-/* Copyright 2005, Hewlett-Packard Company */
-/*
-
-This file is part of netperf4.
-
-Netperf4 is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-Netperf4 is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
-
-In addition, as a special exception, the copyright holders give
-permission to link the code of netperf4 with the OpenSSL project's
-"OpenSSL" library (or with modified versions of it that use the same
-license as the "OpenSSL" library), and distribute the linked
-executables. You must obey the GNU General Public License in all
-respects for all of the code used other than "OpenSSL". If you modify
-this file, you may extend this exception to your version of the file,
-but you are not obligated to do so. If you do not wish to do so,
-delete this exception statement from your version.
-
-*/
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
-/* hist.h
-
- Given a time difference in microseconds, increment one of 61
- different buckets:
-
- 0 - 9 in increments of 1 usec
- 0 - 9 in increments of 10 usecs
- 0 - 9 in increments of 100 usecs
- 0 - 9 in increments of 1 msec
- 0 - 9 in increments of 10 msecs
- 0 - 9 in increments of 100 msecs
- 0 - 9 in increments of 1 sec
- 0 - 9 in increments of 10 sec
- > 100 secs
-
- This will allow any time to be recorded to within an accuracy of
- 10%, and provides a compact representation for capturing the
- distribution of a large number of time differences (e.g.
- request-response latencies).
-
- Colin Low 10/6/93
- Rick Jones 2004-06-15 - extend to 1 and 10 usec
-*/
-#ifndef _HIST_INCLUDED
-#define _HIST_INCLUDED
-
-#ifdef IRIX
-#include <sys/time.h>
-#endif /* IRIX */
-
-struct histogram_struct {
- int unit_usec[10];
- int ten_usec[10];
- int hundred_usec[10];
- int unit_msec[10];
- int ten_msec[10];
- int hundred_msec[10];
- int unit_sec[10];
- int ten_sec[10];
- int ridiculous;
- int total;
-};
-
-typedef struct histogram_struct *HIST;
-
-/*
- HIST_new - return a new, cleared histogram data type
-*/
-
-HIST HIST_new(void);
-
-/*
- HIST_clear - reset a histogram by clearing all totals to zero
-*/
-
-void HIST_clear(HIST h);
-
-/*
- HIST_add - add a time difference to a histogram. Time should be in
- microseconds.
-*/
-
-void HIST_add(register HIST h, int time_delta);
-
-/*
- HIST_report - create an ASCII report on the contents of a histogram.
- Currently printsto standard out
-*/
-
-void HIST_report(HIST h);
-
-/*
- HIST_timestamp - take a timestamp suitable for use in a histogram.
-*/
-
-#ifdef HAVE_GETHRTIME
-void HIST_timestamp(hrtime_t *timestamp);
-#else
-void HIST_timestamp(struct timeval *timestamp);
-#endif
-
-/*
- delta_micro - calculate the difference in microseconds between two
- timestamps
-*/
-#ifdef HAVE_GETHRTIME
-int delta_micro(hrtime_t *begin, hrtime_t *end);
-#else
-int delta_micro(struct timeval *begin, struct timeval *end);
-#endif
-
-#endif
-
Modified: trunk/src/netperf.h
===================================================================
--- trunk/src/netperf.h 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/src/netperf.h 2005-12-09 19:20:17 UTC (rev 33)
@@ -6,6 +6,13 @@
/* we want to get the definition of uint32_t et al */
#include <stdint.h>
+#ifdef WANT_HISTOGRAM
+#include "netperf_hist.h"
+#else
+#define HIST void*
+#endif
+
+
#include "netconfidence.h"
#define NETPERF_DEFAULT_SERVICE_NAME "netperf4"
Copied: trunk/src/netperf_hist.h (from rev 32, trunk/src/hist.h)
===================================================================
--- trunk/src/hist.h 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/src/netperf_hist.h 2005-12-09 19:20:17 UTC (rev 33)
@@ -0,0 +1,143 @@
+/* Copyright 2005, Hewlett-Packard Company */
+
+/*
+
+This file is part of netperf4.
+
+Netperf4 is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+Netperf4 is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of netperf4 with the OpenSSL project's
+"OpenSSL" library (or with modified versions of it that use the same
+license as the "OpenSSL" library), and distribute the linked
+executables. You must obey the GNU General Public License in all
+respects for all of the code used other than "OpenSSL". If you modify
+this file, you may extend this exception to your version of the file,
+but you are not obligated to do so. If you do not wish to do so,
+delete this exception statement from your version.
+
+*/
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+/* hist.h
+
+ Given a time difference in microseconds, increment one of 81
+ different buckets:
+
+ 0 - 9 in increments of 1 usec
+ 0 - 9 in increments of 10 usecs
+ 0 - 9 in increments of 100 usecs
+ 0 - 9 in increments of 1 msec
+ 0 - 9 in increments of 10 msecs
+ 0 - 9 in increments of 100 msecs
+ 0 - 9 in increments of 1 sec
+ 0 - 9 in increments of 10 sec
+ > 100 secs
+
+ This will allow any time to be recorded to within an accuracy of
+ 10%, and provides a compact representation for capturing the
+ distribution of a large number of time differences (e.g.
+ request-response latencies).
+
+ Colin Low 10/6/93
+ Rick Jones 2004-06-15 - extend to 1 and 10 usec
+*/
+#ifndef _HIST_INCLUDED
+#define _HIST_INCLUDED
+
+#ifdef IRIX
+#include <sys/time.h>
+#endif /* IRIX */
+
+struct histogram_struct {
+ int unit_usec[10];
+ int ten_usec[10];
+ int hundred_usec[10];
+ int unit_msec[10];
+ int ten_msec[10];
+ int hundred_msec[10];
+ int unit_sec[10];
+ int ten_sec[10];
+ int ridiculous;
+ int total;
+};
+
+typedef struct histogram_struct *HIST;
+
+/*
+ HIST_new - return a new, cleared histogram data type
+*/
+
+HIST HIST_new(void);
+
+/*
+ HIST_clear - reset a histogram by clearing all totals to zero
+*/
+
+void HIST_clear(HIST h);
+
+/*
+ HIST_add - add a time difference to a histogram. Time should be in
+ microseconds.
+*/
+
+void HIST_add(register HIST h, int time_delta);
+
+/*
+ HIST_report - create an ASCII report on the contents of a histogram.
+ Currently printsto standard out
+*/
+
+void HIST_report(HIST h);
+
+/*
+ HIST_timestamp - take a timestamp suitable for use in a histogram.
+*/
+
+#ifdef HAVE_GETHRTIME
+void HIST_timestamp(hrtime_t *timestamp);
+#else
+void HIST_timestamp(struct timeval *timestamp);
+#endif
+
+/*
+ delta_micro - calculate the difference in microseconds between two
+ timestamps
+ delta_milli - calculate the difference in milliseconds between two
+ timestamps
+ perhaps these things should be moved into netperf.h since they aren't
+ limited to WANT_HISTOGRAM? raj 2005-12-09
+*/
+#ifdef HAVE_GETHRTIME
+int delta_micro(hrtime_t *begin, hrtime_t *end);
+int delta_milli(hrtime_t *begin, hrtime_t *end);
+#else
+int delta_micro(struct timeval *begin, struct timeval *end);
+int delta_milli(struct timeval *begin, struct timeval *end);
+#endif
+
+#endif
+
Modified: trunk/src/nettest_bsd.c
===================================================================
--- trunk/src/nettest_bsd.c 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/src/nettest_bsd.c 2005-12-09 19:20:17 UTC (rev 33)
@@ -33,7 +33,7 @@
@(#)nettest_bsd.c (c) Copyright 2005 Hewlett-Packard Co. $Id$";
#else
#define DIRTY
-#define HISTOGRAM
+#define WANT_HISTOGRAM
#endif /* lint */
#ifdef DIRTY
@@ -82,12 +82,6 @@
#include "netperf.h"
-#ifdef HISTOGRAM
-#include "hist.h"
-#else
-#define HIST void*
-#endif /* HISTOGRAM */
-
#include "nettest_bsd.h"
#ifdef WIN32
@@ -1249,7 +1243,7 @@
HISTOGRAM_VARS;
/* code to make data dirty macro enabled by DIRTY */
MAKE_DIRTY(my_data, my_data->recv_ring);
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_one);
/* recv data for the test */
if ((len=recv(my_data->s_data,
@@ -1274,7 +1268,7 @@
BSDE_DATA_CONNECTION_CLOSED_ERROR,
"data connection closed during TEST_MEASURE state");
}
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_two);
HIST_ADD(my_data->time_hist,delta_micro(&time_one,&time_two));
new_state = CHECK_REQ_STATE;
@@ -1443,7 +1437,7 @@
HISTOGRAM_VARS;
/* code to make data dirty macro enabled by DIRTY */
MAKE_DIRTY(my_data,my_data->send_ring);
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_one);
/* send data for the test */
if((len=send(my_data->s_data,
@@ -1461,7 +1455,7 @@
my_data->stats.named.bytes_sent += len;
my_data->stats.named.send_calls++;
my_data->send_ring = my_data->send_ring->next;
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_two);
HIST_ADD(my_data->time_hist,delta_micro(&time_one,&time_two));
new_state = CHECK_REQ_STATE;
@@ -1488,7 +1482,7 @@
HISTOGRAM_VARS;
/* code to make data dirty macro enabled by DIRTY */
MAKE_DIRTY(my_data,my_data->send_ring);
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_one);
/* send data for the test */
if((len=send(my_data->s_data,
@@ -1831,7 +1825,7 @@
my_data = test->test_specific_data;
proc_name = "recv_tcp_rr_meas";
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_one);
/* recv the request for the test */
req_ptr = my_data->recv_ring->buffer_ptr;
@@ -1877,7 +1871,7 @@
}
}
}
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_two);
HIST_ADD(my_data->time_hist,delta_micro(&time_one,&time_two));
my_data->recv_ring = my_data->recv_ring->next;
@@ -2090,7 +2084,7 @@
HISTOGRAM_VARS;
/* code to make data dirty macro enabled by DIRTY */
MAKE_DIRTY(my_data,my_data->send_ring);
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_one);
/* send data for the test */
if((len=send(my_data->s_data,
@@ -2128,7 +2122,7 @@
break;
}
}
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_two);
HIST_ADD(my_data->time_hist,delta_micro(&time_one,&time_two));
my_data->stats.named.trans_sent++;
Modified: trunk/src/nettest_dns.c
===================================================================
--- trunk/src/nettest_dns.c 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/src/nettest_dns.c 2005-12-09 19:20:17 UTC (rev 33)
@@ -104,12 +104,6 @@
#include "netperf.h"
-#ifdef HISTOGRAM
-#include "hist.h"
-#else
-#define HIST void*
-#endif /* HISTOGRAM */
-
#include "nettest_dns.h"
#ifdef WIN32
@@ -1510,7 +1504,7 @@
}
/* this is what we want to see */
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_two);
HIST_ADD(my_data->time_hist,
delta_milli(&(status_entry->sent_time),&time_two));
Modified: trunk/src/nettest_vst.c
===================================================================
--- trunk/src/nettest_vst.c 2005-12-07 21:32:16 UTC (rev 32)
+++ trunk/src/nettest_vst.c 2005-12-09 19:20:17 UTC (rev 33)
@@ -8,7 +8,7 @@
@(#)nettest_vst.c (c) Copyright 2005 Hewlett-Packard Co. $Id: nettest_vst.c 2005-12-23 00:43:09Z sgb $";
#else
#define DIRTY
-#define HISTOGRAM
+#define WANT_HISTOGRAM
#define INTERVALS
#endif /* lint */
@@ -18,7 +18,7 @@
#define MAKE_DIRTY(mydata,ring) /* DIRTY is not currently supported */
#endif
-#ifdef HISTOGRAM
+#ifdef WANT_HISTOGRAM
#define HISTOGRAM_VARS struct timeval time_one,time_two
#define HIST_TIMESTAMP(time) gettimeofday(time,NULL)
#define HIST_ADD(h,delta) HIST_add(h,delta)
@@ -61,12 +61,6 @@
#include "netperf.h"
-#ifdef HISTOGRAM
-#include "hist.h"
-#else
-#define HIST void*
-#endif /* HISTOGRAM */
-
#include "nettest_vst.h"
@@ -1594,7 +1588,7 @@
my_data = GET_TEST_DATA(test);
while (NO_STATE_CHANGE(test)) {
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_one);
/* recv the request for the test */
req_base = (int *)(
@@ -1658,7 +1652,7 @@
my_data->stats.named.bytes_sent += len;
my_data->stats.named.send_calls++;
}
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_two);
HIST_ADD(my_data->time_hist,delta_macro(&time_one,&time_two));
get_next_vst_transaction(test);
@@ -1890,7 +1884,7 @@
HISTOGRAM_VARS;
/* code to make data dirty macro enabled by DIRTY */
MAKE_DIRTY(my_data,my_data->vst_ring);
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_one);
/* send data for the test */
send_len = my_data->vst_ring->send_size;
@@ -1934,7 +1928,7 @@
break;
}
}
- /* code to timestamp enabled by HISTOGRAM */
+ /* code to timestamp enabled by WANT_HISTOGRAM */
HIST_TIMESTAMP(&time_two);
HIST_ADD(my_data->time_hist,delta_macro(&time_one,&time_two));
my_data->stats.named.trans_sent++;
More information about the netperf-dev
mailing list