[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:
Thiago Marcos P. Santos
2019-11-26 23:37:33 +02:00
parent 91d83accde
commit 8d163c159f
7 changed files with 131 additions and 0 deletions

3
metrics/binary-size.json Normal file
View File

@@ -0,0 +1,3 @@
{
"base_test_path":"tests/binary-size"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

View 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
]
]
}

View 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"
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

View 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
]
]
}

View 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"
}
}
]
}