[render-test] Add network metrics test case

This commit is contained in:
Juha Alanen
2019-10-11 11:34:13 +03:00
parent b53093b522
commit 050b3360ec
13 changed files with 328 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,14 @@
{
"network": [
[
"end",
2,
200000
],
[
"start",
0,
0
]
]
}

View File

@@ -0,0 +1,67 @@
{
"version": 8,
"metadata": {
"test": {
"operations": [
["probeNetworkStart"],
["probeNetwork", "start"],
["wait"],
["probeNetwork", "end"],
["probeNetworkEnd"]
],
"height": 256,
"width": 1024
}
},
"center": [
-73,
15
],
"zoom": 4.5,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt"
]
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "line-center",
"type": "symbol",
"source": "mapbox",
"source-layer": "marine_label",
"layout": {
"text-field": "{name_en}",
"symbol-placement": "line-center",
"text-allow-overlap": true,
"text-size": 35,
"text-letter-spacing": 0.4,
"text-offset": [3, 0],
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
]
}
},
{
"id": "line",
"type": "line",
"source": "mapbox",
"source-layer": "marine_label",
"paint": {
"line-width": 1
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,14 @@
{
"network": [
[
"end",
2,
183111
],
[
"start",
0,
0
]
]
}

View File

@@ -0,0 +1,67 @@
{
"version": 8,
"metadata": {
"test": {
"operations": [
["probeNetworkStart"],
["probeNetwork", "start"],
["wait"],
["probeNetwork", "end"],
["probeNetworkEnd"]
],
"height": 256,
"width": 1024
}
},
"center": [
-73,
15
],
"zoom": 4.5,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt"
]
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "line-center",
"type": "symbol",
"source": "mapbox",
"source-layer": "marine_label",
"layout": {
"text-field": "{name_en}",
"symbol-placement": "line-center",
"text-allow-overlap": true,
"text-size": 35,
"text-letter-spacing": 0.4,
"text-offset": [3, 0],
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
]
}
},
{
"id": "line",
"type": "line",
"source": "mapbox",
"source-layer": "marine_label",
"paint": {
"line-width": 1
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,14 @@
{
"network": [
[
"end",
3,
100000
],
[
"start",
0,
0
]
]
}

View File

@@ -0,0 +1,67 @@
{
"version": 8,
"metadata": {
"test": {
"operations": [
["probeNetworkStart"],
["probeNetwork", "start"],
["wait"],
["probeNetwork", "end"],
["probeNetworkEnd"]
],
"height": 256,
"width": 1024
}
},
"center": [
-73,
15
],
"zoom": 4.5,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt"
]
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "line-center",
"type": "symbol",
"source": "mapbox",
"source-layer": "marine_label",
"layout": {
"text-field": "{name_en}",
"symbol-placement": "line-center",
"text-allow-overlap": true,
"text-size": 35,
"text-letter-spacing": 0.4,
"text-offset": [3, 0],
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
]
}
},
{
"id": "line",
"type": "line",
"source": "mapbox",
"source-layer": "marine_label",
"paint": {
"line-width": 1
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,14 @@
{
"network": [
[
"end",
3,
183111
],
[
"start",
0,
0
]
]
}

View File

@@ -0,0 +1,67 @@
{
"version": 8,
"metadata": {
"test": {
"operations": [
["probeNetworkStart"],
["probeNetwork", "start"],
["wait"],
["probeNetwork", "end"],
["probeNetworkEnd"]
],
"height": 256,
"width": 1024
}
},
"center": [
-73,
15
],
"zoom": 4.5,
"sources": {
"mapbox": {
"type": "vector",
"maxzoom": 14,
"tiles": [
"local://tiles/mapbox.mapbox-streets-v7/{z}-{x}-{y}.mvt"
]
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "line-center",
"type": "symbol",
"source": "mapbox",
"source-layer": "marine_label",
"layout": {
"text-field": "{name_en}",
"symbol-placement": "line-center",
"text-allow-overlap": true,
"text-size": 35,
"text-letter-spacing": 0.4,
"text-offset": [3, 0],
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
]
}
},
{
"id": "line",
"type": "line",
"source": "mapbox",
"source-layer": "marine_label",
"paint": {
"line-width": 1
}
}
]
}

View File

@@ -2,5 +2,8 @@
"tests/file-size/fail-size-is-over": "Should fail, size is bigger than expected.",
"tests/file-size/fail-size-is-under": "Should fail, size is smaller than expected.",
"tests/file-size/fail-file-doesnt-match": "Should fail, doesn't match the expectation.",
"tests/file-size/fail-file-not-found": "Should fail, file not found."
"tests/file-size/fail-file-not-found": "Should fail, file not found.",
"tests/network/fail-requests": "Should fail, number of requests higher than expected.",
"tests/network/fail-transferred": "Should fail, amount of transferred data higher than expected.",
"tests/network/fail-requests-transferred": "Should fail, number of requests higher than expected and amount of transferred data less than expected."
}