Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
measure-load-performance-tests.cc File Reference
#include "measure-load-performance-tests.hh"
#include <ctime>
#include <memory>
#include <string>
#include <utility>
#include <scroom/semaphore.hh>
#include <scroom/threadpool.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

void init_tests ()
 

Function Documentation

◆ init_tests()

void init_tests ( )
88{
89 const int width = 240000;
90 const int height = 240000;
91 // const unsigned int testDuration = 15;
92 const unsigned int sleepDuration = 2;
93
94 functions.emplace_back(Sleeper(sleepDuration));
95
96 functions.emplace_back([] { return setupTest1bpp(-2, width, height); });
97 functions.emplace_back(WaitForAsyncOp("File load 1bpp"));
98
99 // First run may fill the cache
100 functions.emplace_back([] { return setupTest1bpp(-2, width, height); });
101 functions.emplace_back(WaitForAsyncOp("File load 1bpp"));
102
103 functions.emplace_back([] { return setupTest2bpp(-2, width, height); });
104 functions.emplace_back(WaitForAsyncOp("File load 2bpp"));
105
106 functions.emplace_back([] { return setupTest4bpp(-2, width, height); });
107 functions.emplace_back(WaitForAsyncOp("File load 4bpp"));
108
109 functions.emplace_back([] { return setupTest8bpp(-2, width, height); });
110 functions.emplace_back(WaitForAsyncOp("File load 8bpp greyscale"));
111
112 functions.emplace_back([] { return setupTest8bppColormapped(-2, width, height); });
113 functions.emplace_back(WaitForAsyncOp("File load 8bpp colormapped"));
114
115 functions.emplace_back(reset);
116 functions.emplace_back(quit);
117}
provider reset()
Definition test-helpers.cc:131
Definition test-helpers.hh:90
Definition measure-load-performance-tests.cc:25
std::vector< boost::function< bool()> > functions
Definition measure-framerate-callbacks.cc:14
bool setupTest2bpp(int zoom, int width, int height)
Definition test-helpers.cc:168
bool setupTest8bppColormapped(int zoom, int width, int height)
Definition test-helpers.cc:221
bool setupTest1bpp(int zoom, int width, int height)
Definition test-helpers.cc:150
bool setupTest4bpp(int zoom, int width, int height)
Definition test-helpers.cc:186
bool setupTest8bpp(int zoom, int width, int height)
Definition test-helpers.cc:204
bool quit()
Definition test-helpers.cc:124
Here is the call graph for this function: