Blob Blame History Raw
Name:           sockperf
%global mainversion 2.5
%global svnversion 244
Version:        %{mainversion}.%{svnversion}
Release:        1%{?dist}
Summary:        Network benchmarking utility for testing latency and throughput

License:        BSD
URL:            https://code.google.com/p/sockperf/
#Source0:        https://sockperf.googlecode.com/files/%{name}-%{version}.tar.gz
#Source archive generated from upstream SVN checkout:
# svn export -r 244 http://sockperf.googlecode.com/svn/branches/sockperf_v2/ sockperf-2.5.244
# tar -cJvf sockperf-2.5.244.tar.xz sockperf-2.5.244/
Source0:        %{name}-%{version}.tar.xz
Patch1:         0001-Don-t-throw-away-Fedora-s-CXXFLAGS.patch
Patch2:         0002-drop-the-sockperf_-version-copy-of-the-binary.patch
Patch3:         0003-doc-installation-fixes.patch

BuildRequires:  autoconf automake git
BuildRequires:  doxygen

%description
sockperf is a network benchmarking utility over socket API that was designed
for testing performance (latency and throughput) of high-performance systems
(it is also good for testing performance of regular networking systems as
well). It covers most of the socket API calls and options.

Specifically, in addition to the standard throughput tests, sockperf, does the
following:

* Measure latency of each discrete packet at sub-nanosecond resolution (using
  TSC register that counts CPU ticks with very low overhead).

* Does the above for both ping-pong mode and for latency under load mode. This
  means that we measure latency of single packets even under load of millions
  Packets Per Second (without waiting for reply of packet before sending
  subsequent packet on time)

* Enable spike analysis by providing histogram, with various percentiles of the
  packets’ latencies (for example: median, min, max, 99%% percentile, and more),
  (this is in addition to average and standard deviation). Also, sockperf
  provides full log with all packet’s tx/rx times that can be further analyzed
  with external tools, such as MS-Excel or matplotlib - All this without
  affecting the benchmark itself.

* Support MANY optional settings for good coverage of socket API and network
  configurations, while still keeping very low overhead in the fast path to
  allow cleanest results.

%prep
# git_am will be available in a future rpm release.
# http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=bf02debf73b4cad3aa344d5698af82c28619a248
%{!?__scm_setup_git_am: %global __scm_setup_git_am(q) %%{expand:%%__scm_setup_git %%{-q}}}
%{!?__scm_apply_git_am: %global __scm_apply_git_am(qp:m:) %%{__git} am %%{-q} %%{-p:-p%%{-p*}}}
%autosetup -S git_am

%build
# configure.ac invokes 'svnversion' to detect the exact version number.
# It wouldn't work with the tarball. Let's replace it with the SVN version
# known at build time.
sed -i -e "s/svnversion \./echo %{svnversion}/" configure.ac
mkdir -p config/m4
autoreconf -fi
%configure --enable-doc
# --enable-tool --enable-test
make %{?_smp_mflags}


%install
%make_install


%files
%{_bindir}/sockperf
%{_mandir}/man3/sockperf.3.*
%{_pkgdocdir}


%changelog
* Mon Sep 08 2014 Michal Schmidt <mschmidt@redhat.com> - 2.5.244-1
- Update to current upstream from SVN. Has aarch64 and ppc64 support.
- Simplify svnversion substitution.
- Build fix. Make sure config/m4 exists.

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.241-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Mon Jun 16 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.5.241-5
- Added AArch64 support

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.241-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Apr 24 2014 Michal Schmidt <mschmidt@redhat.com> - 2.5.241-3
- Adjust the CXXFLAGS patch to drop all optimization flags changing.
- Run autoreconf with -f to force regenerating config/aux.

* Tue Apr 08 2014 Michal Schmidt <mschmidt@redhat.com> - 2.5.241-2
- Use %%autosetup.

* Fri Mar 21 2014 Michal Schmidt <mschmidt@redhat.com> - 2.5.241-1
- Initial Fedora packaging.