summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rw-r--r--benchmark/fixtures/api/cache.dbbin405504 -> 405504 bytes
-rw-r--r--platform/macos/bitrise.yml10
-rw-r--r--platform/macos/config.cmake22
4 files changed, 44 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 20c4c0f260..cb623b775d 100644
--- a/Makefile
+++ b/Makefile
@@ -88,6 +88,7 @@ $(MACOS_PROJ_PATH): $(BUILD_DEPS) $(MACOS_USER_DATA_PATH)/WorkspaceSettings.xcse
@# Create Xcode schemes so that we can use xcodebuild from the command line. CMake doesn't
@# create these automatically.
SCHEME_NAME=mbgl-test SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
+ SCHEME_NAME=mbgl-benchmark SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
SCHEME_NAME=mbgl-render SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
SCHEME_NAME=mbgl-offline SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
SCHEME_NAME=mbgl-glfw SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
@@ -116,6 +117,10 @@ xproj: $(MACOS_PROJ_PATH)
test: $(MACOS_PROJ_PATH)
set -o pipefail && $(MACOS_XCODEBUILD) -scheme 'mbgl-test' build $(XCPRETTY)
+.PHONY: benchmark
+benchmark: $(MACOS_PROJ_PATH)
+ set -o pipefail && $(MACOS_XCODEBUILD) -scheme 'mbgl-benchmark' build $(XCPRETTY)
+
.PHONY: run-test
run-test: run-test-*
@@ -124,6 +129,12 @@ run-test-%: test
|| (lldb -c /cores/core.$$pid --batch --one-line 'thread backtrace all' --one-line 'quit' && exit 1))
set -o pipefail && $(MACOS_XCODEBUILD) -scheme 'CI' test $(XCPRETTY)
+.PHONY: run-benchmark
+run-benchmark: run-benchmark-.
+
+run-benchmark-%: benchmark
+ $(MACOS_OUTPUT_PATH)/$(BUILDTYPE)/mbgl-benchmark --benchmark_filter=$*
+
.PHONY: glfw-app
glfw-app: $(MACOS_PROJ_PATH)
set -o pipefail && $(MACOS_XCODEBUILD) -scheme 'mbgl-glfw' build $(XCPRETTY)
@@ -392,6 +403,7 @@ $(MACOS_QT_PROJ_PATH): $(BUILD_DEPS)
XCODEPROJ=$(MACOS_QT_PROJ_PATH) SCHEME_NAME=mbgl-qt SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
XCODEPROJ=$(MACOS_QT_PROJ_PATH) SCHEME_NAME=mbgl-qt-qml SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
XCODEPROJ=$(MACOS_QT_PROJ_PATH) SCHEME_NAME=mbgl-test SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
+ XCODEPROJ=$(MACOS_QT_PROJ_PATH) SCHEME_NAME=mbgl-benchmark SCHEME_TYPE=executable platform/macos/scripts/create_scheme.sh
XCODEPROJ=$(MACOS_QT_PROJ_PATH) SCHEME_NAME=mbgl-core SCHEME_TYPE=library BUILDABLE_NAME=libmbgl-core.a BLUEPRINT_NAME=mbgl-core platform/macos/scripts/create_scheme.sh
XCODEPROJ=$(MACOS_QT_PROJ_PATH) SCHEME_NAME=qmapboxgl SCHEME_TYPE=library BUILDABLE_NAME=libqmapboxgl.dylib BLUEPRINT_NAME=qmapboxgl platform/macos/scripts/create_scheme.sh
diff --git a/benchmark/fixtures/api/cache.db b/benchmark/fixtures/api/cache.db
index 033a38de88..102c4074ef 100644
--- a/benchmark/fixtures/api/cache.db
+++ b/benchmark/fixtures/api/cache.db
Binary files differ
diff --git a/platform/macos/bitrise.yml b/platform/macos/bitrise.yml
index f1226f8842..6d51b4878e 100644
--- a/platform/macos/bitrise.yml
+++ b/platform/macos/bitrise.yml
@@ -43,6 +43,16 @@ workflows:
make xproj
- is_debug: 'yes'
- script:
+ title: Build Benchmark Tests
+ run_if: '{{enveq "SKIPCI" "false"}}'
+ inputs:
+ - content: |-
+ #!/bin/bash
+ set -eu -o pipefail
+ export BUILDTYPE=Debug
+ make benchmark
+ - is_debug: 'yes'
+ - script:
title: Run Core Tests
run_if: '{{enveq "SKIPCI" "false"}}'
inputs:
diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake
index 8f64cb89aa..f8d4ab398f 100644
--- a/platform/macos/config.cmake
+++ b/platform/macos/config.cmake
@@ -3,6 +3,7 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10)
mason_use(glfw VERSION 3.2.1)
mason_use(boost_libprogram_options VERSION 1.60.0)
mason_use(gtest VERSION 1.7.0${MASON_CXXABI_SUFFIX})
+mason_use(benchmark VERSION 1.0.0)
include(cmake/loop-darwin.cmake)
@@ -112,6 +113,27 @@ macro(mbgl_platform_test)
)
endmacro()
+macro(mbgl_platform_benchmark)
+ target_sources(mbgl-benchmark
+ PRIVATE benchmark/src/main.cpp
+ )
+
+ set_source_files_properties(
+ benchmark/src/main.cpp
+ PROPERTIES
+ COMPILE_FLAGS -DWORK_DIRECTORY="${CMAKE_SOURCE_DIR}"
+ )
+
+ target_link_libraries(mbgl-benchmark
+ PRIVATE mbgl-loop
+ PRIVATE "-framework Foundation"
+ PRIVATE "-framework CoreGraphics"
+ PRIVATE "-framework OpenGL"
+ PRIVATE "-framework ImageIO"
+ PRIVATE "-framework CoreServices"
+ PRIVATE "-lsqlite3"
+ )
+endmacro()
macro(mbgl_platform_node)
target_link_libraries(mbgl-node