summaryrefslogtreecommitdiff
path: root/gcell/apps
diff options
context:
space:
mode:
Diffstat (limited to 'gcell/apps')
-rw-r--r--gcell/apps/Makefile.am4
-rw-r--r--gcell/apps/benchmark_dma.cc12
-rw-r--r--gcell/apps/benchmark_nop.cc12
-rw-r--r--gcell/apps/benchmark_roundtrip.cc12
4 files changed, 22 insertions, 18 deletions
diff --git a/gcell/apps/Makefile.am b/gcell/apps/Makefile.am
index 7cf9122a3..c3a2092a3 100644
--- a/gcell/apps/Makefile.am
+++ b/gcell/apps/Makefile.am
@@ -22,9 +22,7 @@ include $(top_srcdir)/Makefile.common
SUBDIRS = spu .
-AM_CPPFLAGS = $(DEFINES) $(OMNITHREAD_INCLUDES) \
- $(GCELL_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
-
+AM_CPPFLAGS = $(DEFINES) $(GCELL_INCLUDES) $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
GCELL_QA_LA = $(top_builddir)/gcell/lib/libgcell-qa.la
diff --git a/gcell/apps/benchmark_dma.cc b/gcell/apps/benchmark_dma.cc
index a84defe37..bc3b3f328 100644
--- a/gcell/apps/benchmark_dma.cc
+++ b/gcell/apps/benchmark_dma.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
+ * Copyright 2007,2008,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,7 +23,7 @@
#include <config.h>
#endif
#include <gcell/gc_job_manager.h>
-#include <gnuradio/omni_time.h>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <getopt.h>
#include <stdlib.h>
#include <stdio.h>
@@ -95,6 +95,8 @@ init_jd(gc_job_desc *jd, unsigned int usecs,
static void
run_test(unsigned int nspes, unsigned int usecs, unsigned int dma_size, int getput_mask)
{
+ using namespace boost::posix_time;
+
static const int64_t TOTAL_SIZE_DMA = 5LL << 30;
static const int NJDS = 64;
unsigned int njobs = (unsigned int)(TOTAL_SIZE_DMA / dma_size);
@@ -148,7 +150,7 @@ run_test(unsigned int nspes, unsigned int usecs, unsigned int dma_size, int getp
for (int iter = 0; iter < 1; iter++){
- omni_time t_start = omni_time::time();
+ ptime t_start(microsec_clock::universal_time());
nsubmitted = 0;
ncompleted = 0;
@@ -203,9 +205,9 @@ run_test(unsigned int nspes, unsigned int usecs, unsigned int dma_size, int getp
}
// stop timing
- omni_time t_stop = omni_time::time();
+ ptime t_stop(microsec_clock::universal_time());
- double delta = (t_stop - t_start).double_time();
+ double delta = (t_stop - t_start).total_microseconds() * 1e-6;
printf("nspes: %2d udelay: %4d elapsed_time: %7.3f dma_size: %5d dma_throughput: %7.3e\n",
mgr->nspes(), usecs, delta, dma_size,
(double) njobs * dma_size / delta * (getput_mask == BENCHMARK_GET_PUT ? 2.0 : 1.0));
diff --git a/gcell/apps/benchmark_nop.cc b/gcell/apps/benchmark_nop.cc
index dee46c842..a27373db4 100644
--- a/gcell/apps/benchmark_nop.cc
+++ b/gcell/apps/benchmark_nop.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
+ * Copyright 2007,2008,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,7 +23,7 @@
#include <config.h>
#endif
#include <gcell/gc_job_manager.h>
-#include <gnuradio/omni_time.h>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <getopt.h>
#include <stdlib.h>
#include <stdio.h>
@@ -47,6 +47,8 @@ init_jd(gc_job_desc *jd, unsigned int usecs)
static void
run_test(unsigned int nspes, unsigned int usecs, int njobs)
{
+ using namespace boost::posix_time;
+
static const int NJDS = 64;
int nsubmitted = 0;
int ncompleted = 0;
@@ -73,7 +75,7 @@ run_test(unsigned int nspes, unsigned int usecs, int njobs)
init_jd(all_jds[i], usecs);
}
- omni_time t_start = omni_time::time();
+ ptime t_start(microsec_clock::universal_time());
ci = 0;
njds[0] = 0;
@@ -122,8 +124,8 @@ run_test(unsigned int nspes, unsigned int usecs, int njobs)
}
// stop timing
- omni_time t_stop = omni_time::time();
- double delta = (t_stop - t_start).double_time();
+ ptime t_stop(microsec_clock::universal_time());
+ double delta = (t_stop - t_start).total_microseconds() * 1e-6;
printf("nspes: %2d udelay: %4d elapsed_time: %7.3f njobs: %g speedup: %6.3f\n",
mgr->nspes(), usecs, delta, (double) njobs,
njobs * usecs * 1e-6 / delta);
diff --git a/gcell/apps/benchmark_roundtrip.cc b/gcell/apps/benchmark_roundtrip.cc
index 8ba37c968..b994182a8 100644
--- a/gcell/apps/benchmark_roundtrip.cc
+++ b/gcell/apps/benchmark_roundtrip.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2007,2008,2009 Free Software Foundation, Inc.
+ * Copyright 2007,2008,2009,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -23,7 +23,7 @@
#include <config.h>
#endif
#include <gcell/gc_job_manager.h>
-#include <gnuradio/omni_time.h>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <getopt.h>
#include <stdlib.h>
#include <stdio.h>
@@ -96,6 +96,8 @@ static void
run_test(unsigned int nspes, unsigned int usecs, unsigned int dma_size,
int getput_mask, int njobs_at_once)
{
+ using namespace boost::posix_time;
+
int NJDS = njobs_at_once;
gc_job_desc *all_jds[NJDS];
bool done[NJDS];
@@ -140,7 +142,7 @@ run_test(unsigned int nspes, unsigned int usecs, unsigned int dma_size,
}
int niter = 100000;
- omni_time t_start = omni_time::time();
+ ptime t_start(microsec_clock::universal_time());
for (int iter = 0; iter < niter; iter++){
@@ -164,8 +166,8 @@ run_test(unsigned int nspes, unsigned int usecs, unsigned int dma_size,
}
// stop timing
- omni_time t_stop = omni_time::time();
- double delta = (t_stop - t_start).double_time();
+ ptime t_stop(microsec_clock::universal_time());
+ double delta = (t_stop - t_start).total_microseconds() * 1e-6;
printf("nspes: %2d udelay: %4d elapsed_time: %7.3f dma_size: %5d dma_throughput: %7.3e round_trip: %gus\n",
mgr->nspes(), usecs, delta, dma_size,
(double) NJDS * niter * dma_size / delta * (getput_mask == BENCHMARK_GET_PUT ? 2.0 : 1.0),