[metrics] Add binary size metrics
This test will check the size of the tools and shared libraries built from previous bots in a single run. We will have +/- 1% acceptable variance before the test fails.
This commit is contained in:
3
metrics/binary-size.json
Normal file
3
metrics/binary-size.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"base_test_path":"tests/binary-size"
|
||||
}
|
||||
BIN
metrics/tests/binary-size/shared-library/expected.png
Normal file
BIN
metrics/tests/binary-size/shared-library/expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 225 B |
24
metrics/tests/binary-size/shared-library/metrics.json
Normal file
24
metrics/tests/binary-size/shared-library/metrics.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"file-size": [
|
||||
[
|
||||
"android-arm64-v8a",
|
||||
"/src/workspace/next-android-arm64-v8a-release/lib/libmapbox-gl.so",
|
||||
6496584
|
||||
],
|
||||
[
|
||||
"android-armeabi-v7a",
|
||||
"/src/workspace/next-android-armeabi-v7a-release/lib/libmapbox-gl.so",
|
||||
3072756
|
||||
],
|
||||
[
|
||||
"android-x86-release",
|
||||
"/src/workspace/next-android-x86-release/lib/libmapbox-gl.so",
|
||||
6988568
|
||||
],
|
||||
[
|
||||
"android-x86_64",
|
||||
"/src/workspace/next-android-x86_64-release/lib/libmapbox-gl.so",
|
||||
7106920
|
||||
]
|
||||
]
|
||||
}
|
||||
25
metrics/tests/binary-size/shared-library/style.json
Normal file
25
metrics/tests/binary-size/shared-library/style.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"operations": [
|
||||
["probeFileSize", "android-arm64-v8a", "/src/workspace/next-android-arm64-v8a-release/lib/libmapbox-gl.so", 0.01],
|
||||
["probeFileSize", "android-armeabi-v7a", "/src/workspace/next-android-armeabi-v7a-release/lib/libmapbox-gl.so", 0.01],
|
||||
["probeFileSize", "android-x86-release", "/src/workspace/next-android-x86-release/lib/libmapbox-gl.so", 0.01],
|
||||
["probeFileSize", "android-x86_64", "/src/workspace/next-android-x86_64-release/lib/libmapbox-gl.so", 0.01]
|
||||
],
|
||||
"width": 64,
|
||||
"height": 64
|
||||
}
|
||||
},
|
||||
"sources": {},
|
||||
"layers": [
|
||||
{
|
||||
"id": "background",
|
||||
"type": "background",
|
||||
"paint": {
|
||||
"background-color": "green"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
metrics/tests/binary-size/tools/expected.png
Normal file
BIN
metrics/tests/binary-size/tools/expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 225 B |
49
metrics/tests/binary-size/tools/metrics.json
Normal file
49
metrics/tests/binary-size/tools/metrics.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"file-size": [
|
||||
[
|
||||
"linux-clang8-mbgl-glfw",
|
||||
"/src/workspace/next-linux-clang8-release/bin/mbgl-glfw",
|
||||
6225032
|
||||
],
|
||||
[
|
||||
"linux-clang8-mbgl-offline",
|
||||
"/src/workspace/next-linux-clang8-release/bin/mbgl-offline",
|
||||
5532376
|
||||
],
|
||||
[
|
||||
"linux-clang8-mbgl-render",
|
||||
"/src/workspace/next-linux-clang8-release/bin/mbgl-render",
|
||||
6151096
|
||||
],
|
||||
[
|
||||
"linux-gcc8-mbgl-glfw",
|
||||
"/src/workspace/next-linux-gcc8-release/bin/mbgl-glfw",
|
||||
7205192
|
||||
],
|
||||
[
|
||||
"linux-gcc8-mbgl-offline",
|
||||
"/src/workspace/next-linux-gcc8-release/bin/mbgl-offline",
|
||||
6357224
|
||||
],
|
||||
[
|
||||
"linux-gcc8-mbgl-render",
|
||||
"/src/workspace/next-linux-gcc8-release/bin/mbgl-render",
|
||||
7143752
|
||||
],
|
||||
[
|
||||
"macos-xcode11-mbgl-glfw",
|
||||
"/src/workspace/next-macos-xcode11-release/bin/mbgl-glfw",
|
||||
5439932
|
||||
],
|
||||
[
|
||||
"macos-xcode11-mbgl-offline",
|
||||
"/src/workspace/next-macos-xcode11-release/bin/mbgl-offline",
|
||||
5334136
|
||||
],
|
||||
[
|
||||
"macos-xcode11-mbgl-render",
|
||||
"/src/workspace/next-macos-xcode11-release/bin/mbgl-render",
|
||||
5384420
|
||||
]
|
||||
]
|
||||
}
|
||||
30
metrics/tests/binary-size/tools/style.json
Normal file
30
metrics/tests/binary-size/tools/style.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"version": 8,
|
||||
"metadata": {
|
||||
"test": {
|
||||
"operations": [
|
||||
["probeFileSize", "linux-clang8-mbgl-glfw", "/src/workspace/next-linux-clang8-release/bin/mbgl-glfw", 0.01],
|
||||
["probeFileSize", "linux-clang8-mbgl-offline", "/src/workspace/next-linux-clang8-release/bin/mbgl-offline", 0.01],
|
||||
["probeFileSize", "linux-clang8-mbgl-render", "/src/workspace/next-linux-clang8-release/bin/mbgl-render", 0.01],
|
||||
["probeFileSize", "linux-gcc8-mbgl-glfw", "/src/workspace/next-linux-gcc8-release/bin/mbgl-glfw", 0.01],
|
||||
["probeFileSize", "linux-gcc8-mbgl-offline", "/src/workspace/next-linux-gcc8-release/bin/mbgl-offline", 0.01],
|
||||
["probeFileSize", "linux-gcc8-mbgl-render", "/src/workspace/next-linux-gcc8-release/bin/mbgl-render", 0.01],
|
||||
["probeFileSize", "macos-xcode11-mbgl-glfw", "/src/workspace/next-macos-xcode11-release/bin/mbgl-glfw", 0.01],
|
||||
["probeFileSize", "macos-xcode11-mbgl-offline", "/src/workspace/next-macos-xcode11-release/bin/mbgl-offline", 0.01],
|
||||
["probeFileSize", "macos-xcode11-mbgl-render", "/src/workspace/next-macos-xcode11-release/bin/mbgl-render", 0.01]
|
||||
],
|
||||
"width": 64,
|
||||
"height": 64
|
||||
}
|
||||
},
|
||||
"sources": {},
|
||||
"layers": [
|
||||
{
|
||||
"id": "background",
|
||||
"type": "background",
|
||||
"paint": {
|
||||
"background-color": "green"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user