mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-17 20:53:02 +00:00
Keep windows open in Linux
This commit is contained in:
parent
d0bd3987e1
commit
c4ba566c42
@ -48,7 +48,26 @@
|
||||
DEFINE_int32(fft_iterations_test, 1000, "Number of averaged iterations in FFT length timing test");
|
||||
DEFINE_bool(plot_fft_length_test, false, "Plots results of FFTLengthTest");
|
||||
|
||||
TEST(FFTLengthTest, MeasureExecutionTime)
|
||||
|
||||
class FFTLengthTest: public ::testing::Test
|
||||
{
|
||||
public:
|
||||
void wait_for_key();
|
||||
};
|
||||
|
||||
|
||||
void FFTLengthTest::wait_for_key()
|
||||
{
|
||||
std::cout << std::endl << "Press ENTER to continue..." << std::endl;
|
||||
|
||||
std::cin.clear();
|
||||
std::cin.ignore(std::cin.rdbuf()->in_avail());
|
||||
std::cin.get();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
TEST_F(FFTLengthTest, MeasureExecutionTime)
|
||||
{
|
||||
unsigned int fft_sizes [] = { 512, 1000, 1024, 1100, 1297, 1400, 1500, 1960, 2000, 2048, 2221, 2500, 3000, 3500, 4000,
|
||||
4096, 4200, 4500, 4725, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8192, 8500, 9000, 9500, 10000, 10368, 11000,
|
||||
@ -114,6 +133,8 @@ TEST(FFTLengthTest, MeasureExecutionTime)
|
||||
else
|
||||
{
|
||||
#if defined GNUPLOT_EXECUTABLE
|
||||
try
|
||||
{
|
||||
std::string gnuplot_executable = std::string(GNUPLOT_EXECUTABLE);
|
||||
boost::filesystem::path p(gnuplot_executable);
|
||||
boost::filesystem::path dir = p.parent_path();
|
||||
@ -139,6 +160,14 @@ TEST(FFTLengthTest, MeasureExecutionTime)
|
||||
g2.set_style("points").plot_xy(powers_of_two, execution_times_powers_of_two, "Power of 2");
|
||||
g2.savetops("FFT_execution_times");
|
||||
g2.showonscreen(); // window output
|
||||
#if !defined __APPLE__
|
||||
wait_for_key();
|
||||
#endif
|
||||
}
|
||||
catch (GnuplotException ge)
|
||||
{
|
||||
std::cout << ge.what() << std::endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user