diff options
author | Mike Morris <mikemorris@users.noreply.github.com> | 2016-08-22 15:04:20 -0400 |
---|---|---|
committer | Mike Morris <mikemorris@users.noreply.github.com> | 2016-08-26 10:55:42 -0400 |
commit | 864f4a3027a1f6db9e1c770704291b7e9b83a3cc (patch) | |
tree | 595dcdb0dee34bc58d3d8c8c8b70bab8615acc06 | |
parent | 76a9a11a41c39f2e9445eb83a3f22b901dd28eb4 (diff) | |
download | qtlocation-mapboxgl-864f4a3027a1f6db9e1c770704291b7e9b83a3cc.tar.gz |
[node] unskip tests, stopwatch render times
-rw-r--r-- | platform/default/headless_view.cpp | 6 | ||||
-rw-r--r-- | platform/node/test/js/partial.test.js | 10 | ||||
-rw-r--r-- | src/mbgl/map/map.cpp | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/platform/default/headless_view.cpp b/platform/default/headless_view.cpp index 945de32037..71fdf5885b 100644 --- a/platform/default/headless_view.cpp +++ b/platform/default/headless_view.cpp @@ -42,7 +42,7 @@ void HeadlessView::resize(const uint16_t width, const uint16_t height) { } PremultipliedImage HeadlessView::readStillImage() { - util::stopwatch stopwatch("readStillImage", Event::General); + util::stopwatch stopwatch("readStillImage", EventSeverity::Info, Event::General); assert(active); const unsigned int w = dimensions[0] * pixelRatio; @@ -50,7 +50,7 @@ PremultipliedImage HeadlessView::readStillImage() { PremultipliedImage image { w, h }; { - util::stopwatch stopwatch2("glReadPixels", Event::General); + util::stopwatch stopwatch2("glReadPixels", EventSeverity::Info, Event::General); MBGL_CHECK_ERROR(glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, image.data.get())); } @@ -58,7 +58,7 @@ PremultipliedImage HeadlessView::readStillImage() { auto tmp = std::make_unique<uint8_t[]>(stride); uint8_t* rgba = image.data.get(); { - util::stopwatch stopwatch3("memcpy", Event::General); + util::stopwatch stopwatch3("memcpy", EventSeverity::Info, Event::General); for (int i = 0, j = h - 1; i < j; i++, j--) { std::memcpy(tmp.get(), rgba + i * stride, stride); std::memcpy(rgba + i * stride, rgba + j * stride, stride); diff --git a/platform/node/test/js/partial.test.js b/platform/node/test/js/partial.test.js index 0095cc6051..2ea8dc892e 100644 --- a/platform/node/test/js/partial.test.js +++ b/platform/node/test/js/partial.test.js @@ -1,6 +1,6 @@ 'use strict'; -var test = require('tape'); +var test = require('tape').test; var mbgl = require('../../../../lib/mapbox-gl-native'); var fs = require('fs'); var path = require('path'); @@ -42,7 +42,7 @@ function readFile(req, callback) { } } -test.skip('Slow tiles', function(t) { +test('Slow tiles', function(t) { var options = { request: function(req, callback) { switch (req.kind) { @@ -85,7 +85,7 @@ test('Partial tiles with slow resources', function(t) { ratio: 1 }; - t.skip('Slow glyphs', function(t) { + t.test('Slow glyphs', function(t) { var map = new mbgl.Map(options); map.load(glyphs); @@ -95,7 +95,7 @@ test('Partial tiles with slow resources', function(t) { }); }); - t.skip('Slow sprite', function(t) { + t.test('Slow sprite', function(t) { var map = new mbgl.Map(options); map.load(sprite); @@ -107,7 +107,7 @@ test('Partial tiles with slow resources', function(t) { t.test('Many slow resources', function(t) { var map = new mbgl.Map(options); - map.load(satellite); + map.load(streets); map.render({ center: [-122.4403, 37.7497], diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 8521d828cf..981c03074d 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -244,7 +244,7 @@ void Map::Impl::update() { if (mode == MapMode::Continuous) { view.invalidate(); } else if (callback && style->isLoaded()) { - util::stopwatch stopwatch2("render", Event::General); + util::stopwatch stopwatch("render", EventSeverity::Info, Event::General); Log::Info(Event::General, "[Map::Impl::update] Activating view and rendering"); view.activate(); render(); |