src-example/client/js/app.js
/**
     * Deal with the response from the server.
     */
Deal with the response from the server.
Deal with the response from the server .
function processResponse(index, success, response) {
      var result = $scope.results[index];
      $scope.firstResult = $scope.firstResult || result;
      result.endTime = Date.now();
      result.completed = true;
      result.success = success;
      result.elapsed = result.endTime - result.startTime;
      result.responseData = JSON.stringify(response.data);
      if (index === 0) {
        result.cached = false;
      } else if (result.responseData === $scope.firstResult.responseData) {
        result.cached = true;
      } else {
        result.cached = false;
      }
      if (!$scope.isRunning()) {
        $scope.runEnded();
      }
    }
function processResponse ( index , success , response ) { var result = $scope . results [ index ] ; $scope . firstResult = $scope . firstResult || result ; result . endTime = Date . now ( ) ; result . completed = true ; result . success = success ; result . elapsed = result . endTime - result . startTime ; result . responseData = JSON . stringify ( response . data ) ; if ( index === 0 ) { result . cached = false ; } else if ( result . responseData === $scope . firstResult . responseData ) { result . cached = true ; } else { result . cached = false ; } if ( ! $scope . isRunning ( ) ) { $scope . runEnded ( ) ; } }
Deal with the response from the server.
Deal with the response from the server .
// Complete the run if we're done.