rebaseline_server: display how long it took to render the list
BUG=skia:2248 NOTREECHECKS=True NOTRY=True R=borenet@google.com Author: epoger@google.com Review URL: https://codereview.chromium.org/189833008 git-svn-id: http://skia.googlecode.com/svn/trunk@13720 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
e8ead8e510
commit
fadc749bd0
@ -8,6 +8,21 @@ var Loader = angular.module(
|
||||
['ConstantsModule', 'diff_viewer']
|
||||
);
|
||||
|
||||
Loader.directive(
|
||||
'resultsUpdatedCallbackDirective',
|
||||
['$timeout',
|
||||
function($timeout) {
|
||||
return function(scope, element, attrs) {
|
||||
if (scope.$last) {
|
||||
$timeout(function() {
|
||||
scope.resultsUpdatedCallback();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
// TODO(epoger): Combine ALL of our filtering operations (including
|
||||
// truncation) into this one filter, so that runs most efficiently?
|
||||
// (We would have to make sure truncation still took place after
|
||||
@ -44,7 +59,7 @@ Loader.filter(
|
||||
|
||||
Loader.controller(
|
||||
'Loader.Controller',
|
||||
function($scope, $http, $filter, $location, $timeout, constants) {
|
||||
function($scope, $http, $filter, $location, $log, $timeout, constants) {
|
||||
$scope.constants = constants;
|
||||
$scope.windowTitle = "Loading GM Results...";
|
||||
$scope.resultsToLoad = $location.search().resultsToLoad;
|
||||
@ -77,7 +92,6 @@ Loader.controller(
|
||||
$scope.imageSets = data[constants.KEY__IMAGESETS];
|
||||
$scope.sortColumnSubdict = constants.KEY__DIFFERENCE_DATA;
|
||||
$scope.sortColumnKey = constants.KEY__DIFFERENCE_DATA__WEIGHTED_DIFF;
|
||||
$scope.showTodos = false;
|
||||
|
||||
$scope.showSubmitAdvancedSettings = false;
|
||||
$scope.submitAdvancedSettings = {};
|
||||
@ -357,6 +371,8 @@ Loader.controller(
|
||||
* can be bookmarked.
|
||||
*/
|
||||
$scope.updateResults = function() {
|
||||
$scope.renderStartTime = window.performance.now();
|
||||
$log.debug("renderStartTime: " + $scope.renderStartTime);
|
||||
$scope.displayLimit = $scope.displayLimitPending;
|
||||
// TODO(epoger): Every time we apply a filter, AngularJS creates
|
||||
// another copy of the array. Is there a way we can filter out
|
||||
@ -403,6 +419,15 @@ Loader.controller(
|
||||
$scope.queryParameters.save();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called when the results have been completely rendered
|
||||
* after updateResults().
|
||||
*/
|
||||
$scope.resultsUpdatedCallback = function() {
|
||||
$scope.renderEndTime = window.performance.now();
|
||||
$log.debug("renderEndTime: " + $scope.renderEndTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-sort the displayed results.
|
||||
*
|
||||
|
@ -187,10 +187,13 @@
|
||||
<td>
|
||||
Found {{filteredImagePairs.length}} matches;
|
||||
<span ng-show="filteredImagePairs.length > limitedImagePairs.length">
|
||||
displaying the first {{limitedImagePairs.length}}
|
||||
displaying the first {{limitedImagePairs.length}}.
|
||||
</span>
|
||||
<span ng-show="filteredImagePairs.length <= limitedImagePairs.length">
|
||||
displaying them all
|
||||
displaying them all.
|
||||
</span>
|
||||
<span ng-show="renderEndTime > renderStartTime">
|
||||
Rendered in {{(renderEndTime - renderStartTime).toFixed(0)}} ms.
|
||||
</span>
|
||||
<br>
|
||||
(click on the column header radio buttons to re-sort by that column)
|
||||
@ -272,7 +275,7 @@
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr ng-repeat="imagePair in limitedImagePairs" ng-controller="ImageController">
|
||||
<tr ng-repeat="imagePair in limitedImagePairs" ng-controller="ImageController" results-updated-callback-directive>
|
||||
<td>
|
||||
{{imagePair[constants.KEY__EXTRA_COLUMN_VALUES][constants.KEY__EXTRACOLUMN__RESULT_TYPE]}}
|
||||
<br>
|
||||
|
Loading…
Reference in New Issue
Block a user