Scroom  0.14
measure-load-performance-tests.cc File Reference
#include "measure-load-performance-tests.hh"
#include <ctime>
#include <string>
#include <utility>
#include <boost/shared_ptr.hpp>
#include <scroom/semaphore.hh>
#include <scroom/threadpool.hh>
#include <scroom/unused.hh>
#include "measure-framerate-callbacks.hh"
#include "measure-framerate-stubs.hh"
#include "test-helpers.hh"
Include dependency graph for measure-load-performance-tests.cc:

Classes

class  WaitForAsyncOp
 

Functions

static void clear (Scroom::Semaphore &s)
 
void init_tests ()
 

Function Documentation

◆ clear()

static void clear ( Scroom::Semaphore s)
static
26 { s.V(); }

Referenced by WaitForAsyncOp::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_tests()

void init_tests ( )
92 {
93  const int width = 240000;
94  const int height = 240000;
95  // const unsigned int testDuration = 15;
96  const unsigned int sleepDuration = 2;
97 
98  functions.emplace_back(Sleeper(sleepDuration));
99 
100  functions.emplace_back(boost::bind(setupTest1bpp, -2, width, height));
101  functions.emplace_back(WaitForAsyncOp("File load 1bpp"));
102 
103  // First run may fill the cache
104  functions.emplace_back(boost::bind(setupTest1bpp, -2, width, height));
105  functions.emplace_back(WaitForAsyncOp("File load 1bpp"));
106 
107  functions.emplace_back(boost::bind(setupTest2bpp, -2, width, height));
108  functions.emplace_back(WaitForAsyncOp("File load 2bpp"));
109 
110  functions.emplace_back(boost::bind(setupTest4bpp, -2, width, height));
111  functions.emplace_back(WaitForAsyncOp("File load 4bpp"));
112 
113  functions.emplace_back(boost::bind(setupTest8bpp, -2, width, height));
114  functions.emplace_back(WaitForAsyncOp("File load 8bpp greyscale"));
115 
116  functions.emplace_back(boost::bind(setupTest8bppColormapped, -2, width, height));
117  functions.emplace_back(WaitForAsyncOp("File load 8bpp colormapped"));
118 
119  functions.emplace_back(reset);
120  functions.emplace_back(quit);
121 }
Here is the call graph for this function:
setupTest8bpp
bool setupTest8bpp(int zoom, int width, int height)
Definition: test-helpers.cc:200
setupTest4bpp
bool setupTest4bpp(int zoom, int width, int height)
Definition: test-helpers.cc:182
Sleeper
Definition: test-helpers.hh:85
functions
std::vector< boost::function< bool()> > functions
Definition: measure-framerate-callbacks.cc:16
reset
bool reset()
Definition: test-helpers.cc:127
quit
bool quit()
Definition: test-helpers.cc:120
WaitForAsyncOp
Definition: measure-load-performance-tests.cc:28
setupTest2bpp
bool setupTest2bpp(int zoom, int width, int height)
Definition: test-helpers.cc:164
setupTest1bpp
bool setupTest1bpp(int zoom, int width, int height)
Definition: test-helpers.cc:146
Scroom::Semaphore::V
void V()
Definition: semaphore.hh:77
setupTest8bppColormapped
bool setupTest8bppColormapped(int zoom, int width, int height)
Definition: test-helpers.cc:217