X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FActiveFeeder.test.cc;h=8d9aa55e858a42c56fcc4585f4f750ef070150c4;hb=bd9f9d3fd6fbcff0112a7bf48ab9284da9576b11;hp=e5c66d26aa83cee68bcdd8bafa079e6aeef2214e;hpb=0327b3f303ea2a61d44a30bfaac022874dcf2a0d;p=senf.git diff --git a/PPI/ActiveFeeder.test.cc b/PPI/ActiveFeeder.test.cc index e5c66d2..8d9aa55 100644 --- a/PPI/ActiveFeeder.test.cc +++ b/PPI/ActiveFeeder.test.cc @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -21,7 +21,7 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief ActiveFeeder.test unit tests */ + \brief ActiveFeeder unit tests */ //#include "ActiveFeeder.test.hh" //#include "ActiveFeeder.test.ih" @@ -31,7 +31,7 @@ #include "DebugModules.hh" #include "Setup.hh" -#include +#include "../Utils/auto_unit_test.hh" #include #define prefix_ @@ -43,21 +43,24 @@ namespace module = senf::ppi::module; BOOST_AUTO_UNIT_TEST(activeFeeder) { - debug::PassivePacketSource source; - debug::PassivePacketSink sink; + debug::PassiveSource source; + debug::PassiveSink sink; module::ActiveFeeder feeder; ppi::connect(source,feeder); ppi::connect(feeder,sink); - source.submit(senf::DataPacket::create()); - source.submit(senf::DataPacket::create()); - source.submit(senf::DataPacket::create()); + for (unsigned i (0); i < 500; ++i) + source.submit(senf::DataPacket::create()); + senf::ClockService::clock_type start (senf::ClockService::now()); ppi::run(); + std::cerr << "ActiveFeeder: " + << (500*1e9)/(senf::ClockService::now()-start) + << " packets/s" << std::endl; BOOST_CHECK_EQUAL( source.size(), 0u ); - BOOST_CHECK_EQUAL( sink.size(), 3u ); + BOOST_CHECK_EQUAL( sink.size(), 500u ); } ///////////////////////////////cc.e////////////////////////////////////////