Revert "Bug 1295536 - Validate that perfherder values are within acceptable ranges" (#1788)

Reverts mozilla/treeherder#1786, due to:
https://bugzilla.mozilla.org/show_bug.cgi?id=1295536#c9
This commit is contained in:
Ed Morley 2016-08-17 00:02:02 +01:00 коммит произвёл GitHub
Родитель 07db3a801b
Коммит 8858fc1443
2 изменённых файлов: 10 добавлений и 61 удалений

Просмотреть файл

@ -18,9 +18,7 @@
"value": {
"description": "Summary value for subtest",
"title": "Subtest value",
"type": "number",
"minimum": -1000000000.0,
"maximum": 1000000000.0
"type": "number"
},
"lowerIsBetter": {
"description": "Whether lower values are better for subtest",
@ -35,30 +33,22 @@
"alertThreshold": {
"description": "% change threshold before alerting",
"title": "Alert threshold",
"type": "number",
"minimum": 0.0,
"maximum": 1000.0
"type": "number"
},
"minBackWindow": {
"description": "Minimum back window to use for alerting",
"title": "Minimum back window",
"type": "number",
"minimum": 1,
"maximum": 255
"type": "number"
},
"maxBackWindow": {
"description": "Maximum back window to use for alerting",
"title": "Maximum back window",
"type": "number",
"minimum": 1,
"maximum": 255
"type": "number"
},
"foreWindow": {
"description": "Fore window to use for alerting",
"title": "Fore window",
"type": "number",
"minimum": 1,
"maximum": 255
"type": "number"
}
},
"required": [
@ -90,9 +80,7 @@
},
"value": {
"title": "Suite value",
"type": "number",
"minimum": -1000000000.0,
"maximum": 1000000000.0
"type": "number"
},
"lowerIsBetter": {
"description": "Whether lower values are better for suite",
@ -107,30 +95,22 @@
"alertThreshold": {
"description": "% change threshold before alerting",
"title": "Alert threshold",
"type": "number",
"minimum": 0.0,
"maximum": 1000.0
"type": "number"
},
"minBackWindow": {
"description": "Minimum back window to use for alerting",
"title": "Minimum back window",
"type": "integer",
"minimum": 1,
"maximum": 255
"type": "number"
},
"maxBackWindow": {
"description": "Maximum back window to use for alerting",
"title": "Maximum back window",
"type": "integer",
"minimum": 1,
"maximum": 255
"type": "number"
},
"foreWindow": {
"description": "Fore window to use for alerting",
"title": "Fore window",
"type": "integer",
"minimum": 1,
"maximum": 255
"type": "number"
}
},
"required": [

Просмотреть файл

@ -1,31 +0,0 @@
import json
import jsonschema
import pytest
@pytest.mark.parametrize(('suite_value', 'test_value', 'expected_fail'),
[({}, {}, True),
({'value': 1234}, {}, True),
({}, {'value': 1234}, False),
({'value': 1234}, {'value': 1234}, False),
({'value': float('inf')}, {}, True),
({}, {'value': float('inf')}, True)])
def test_perf_schema(suite_value, test_value, expected_fail):
perf_schema = json.load(open('schemas/performance-artifact.json'))
datum = {
"framework": {"name": "talos"}, "suites": [{
"name": "basic_compositor_video",
"subtests": [{
"name": "240p.120fps.mp4_scale_fullscreen_startup"
}]
}]
}
datum['suites'][0].update(suite_value)
datum['suites'][0]['subtests'][0].update(test_value)
print datum
if expected_fail:
with pytest.raises(jsonschema.ValidationError):
jsonschema.validate(datum, perf_schema)
else:
jsonschema.validate(datum, perf_schema)