зеркало из https://github.com/mozilla/eideticker.git
Bug 980596 - Fix html view of results created by get-metric-for-build;r=davehunt
This commit is contained in:
Родитель
204474b4d1
Коммит
8b556e0737
|
@ -89,7 +89,7 @@ def runtest(device_prefs, testname, options, apk=None, appname=None,
|
|||
eideticker.get_standard_metrics(capture, testlog.actions))
|
||||
metadata['metrics'] = metrics
|
||||
|
||||
metadata['framediffSums'] = videocapture.get_framediff_sums(capture)
|
||||
metadata['frameDiffSums'] = videocapture.get_framediff_sums(capture)
|
||||
|
||||
if options.outputdir:
|
||||
# video
|
||||
|
|
|
@ -26,12 +26,12 @@ function updateGraph(rawdata, measure) {
|
|||
// show individual data points
|
||||
var graphdata = [];
|
||||
var colorCounter = 0;
|
||||
var metadataHash = {};
|
||||
var uuidHash = {};
|
||||
|
||||
var seriesIndex = 0;
|
||||
var barPosition = 1;
|
||||
Object.keys(rawdata).sort().forEach(function(appname) {
|
||||
metadataHash[seriesIndex] = [];
|
||||
uuidHash[seriesIndex] = [];
|
||||
|
||||
var label;
|
||||
var color = colorCounter;
|
||||
|
@ -60,8 +60,9 @@ function updateGraph(rawdata, measure) {
|
|||
};
|
||||
rawdata[appname].forEach(function(sample) {
|
||||
series.data.push([ barPosition, sample[measure] ]);
|
||||
console.log(sample.uuid);
|
||||
uuidHash[seriesIndex].push(sample.uuid);
|
||||
|
||||
metadataHash[seriesIndex].push({'videoURL': sample.video, 'appDate': sample.appdate, 'revision': sample.revision, 'buildId': sample.buildid, 'frameDiff': sample.frameDiff, 'fps': sample.captureFPS, 'generatedVideoFPS': sample.generatedVideoFPS });
|
||||
barPosition++;
|
||||
});
|
||||
graphdata.push(series);
|
||||
|
@ -94,21 +95,21 @@ function updateGraph(rawdata, measure) {
|
|||
$("#graph-container").bind("plotclick", function (event, pos, item) {
|
||||
plot.unhighlight();
|
||||
if (item) {
|
||||
var metadata = metadataHash[item.seriesIndex][item.dataIndex];
|
||||
$('#datapoint-info').html(ich.graphDatapoint({ 'date': null,
|
||||
'videoURL': metadata.videoURL,
|
||||
var uuid = uuidHash[item.seriesIndex][item.dataIndex];
|
||||
$.getJSON('metadata/' + uuid + '.json', function(metadata) {
|
||||
$('#datapoint-info').html(ich.graphDatapoint({ 'uuid': uuid,
|
||||
'date': null,
|
||||
'videoURL': metadata.video,
|
||||
'measureName': measure,
|
||||
'appDate': metadata.appDate,
|
||||
'revision': metadata.revision,
|
||||
'buildId': metadata.buildId,
|
||||
'measureValue': Math.round(100.0*item.datapoint[1])/100.0,
|
||||
'frameDiff': metadata.frameDiff,
|
||||
'fps': metadata.fps,
|
||||
'generatedVideoFPS': metadata.generatedVideoFPS
|
||||
'frameDiff': (metadata.frameDiffSums) ? true : false
|
||||
}));
|
||||
$('#video').css('width', $('#video').parent().width());
|
||||
$('#video').css('max-height', $('#graph-container').height());
|
||||
|
||||
});
|
||||
plot.highlight(item.series, item.datapoint);
|
||||
} else {
|
||||
$('#datapoint-info').html(null);
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
<dd>{{measureValue}}</dd>
|
||||
</dl>
|
||||
{{#frameDiff}}
|
||||
<p><a href="framediff-view.html?title=Frame Difference&video={{videoURL}}&framediff={{frameDiff}}&fps={{fps}}&videoFPS={{videoFPS}}" target="_blank">Frame difference view</a></p>
|
||||
<p><a href="framediff-view.html?id={{uuid}}" target="_blank">Frame difference view</a></p>
|
||||
{{/frameDiff}}
|
||||
</div>
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче