summaryrefslogtreecommitdiff
path: root/render-test/metadata.hpp
diff options
context:
space:
mode:
authorMikko Pulkki <55925868+mpulkki-mapbox@users.noreply.github.com>2019-10-22 12:13:55 +0300
committerGitHub <noreply@github.com>2019-10-22 12:13:55 +0300
commit0ca96fd8a402ae530da72e3955196007a2ec365f (patch)
treec1fc1b6194261bdcf3d3243d75368f7bf396e78a /render-test/metadata.hpp
parentbb0e5ffb2ceea28d386a9ac317ab9e1e81d83b07 (diff)
downloadqtlocation-mapboxgl-0ca96fd8a402ae530da72e3955196007a2ec365f.tar.gz
[render-test] Implement fps benchmarking tests (#15803)
Diffstat (limited to 'render-test/metadata.hpp')
-rw-r--r--render-test/metadata.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/render-test/metadata.hpp b/render-test/metadata.hpp
index 1d5a346f22..996a2bc429 100644
--- a/render-test/metadata.hpp
+++ b/render-test/metadata.hpp
@@ -68,6 +68,12 @@ struct MemoryProbe {
}
};
+struct FpsProbe {
+ float average = 0.0;
+ float minOnePc = 0.0;
+ float tolerance = 0.0f;
+};
+
struct NetworkProbe {
NetworkProbe() = default;
NetworkProbe(size_t requests_, size_t transferred_) : requests(requests_), transferred(transferred_) {}
@@ -78,10 +84,11 @@ struct NetworkProbe {
class TestMetrics {
public:
- bool isEmpty() const { return fileSize.empty() && memory.empty() && network.empty(); }
+ bool isEmpty() const { return fileSize.empty() && memory.empty() && network.empty() && fps.empty(); }
std::map<std::string, FileSizeProbe> fileSize;
std::map<std::string, MemoryProbe> memory;
std::map<std::string, NetworkProbe> network;
+ std::map<std::string, FpsProbe> fps;
};
struct TestMetadata {
@@ -90,6 +97,7 @@ struct TestMetadata {
TestPaths paths;
mbgl::JSDocument document;
bool renderTest = true;
+ bool outputsImage = true;
mbgl::Size size{ 512u, 512u };
float pixelRatio = 1.0f;