@@ -60,6 +60,7 @@ angular.module('app').controller('trainingCtrl', function ($scope, $state, mainS
6060 var solutions = solutionsCode . getValue ( ) ;
6161 var examples = examplesCode . getValue ( ) ;
6262 $scope . showOutput ( ) ;
63+ var t0 = performance . now ( ) ;
6364 solutions = solutions
6465 . replace ( / \s * \n * \r * \/ \/ .* \n * \r * / g, '' )
6566 . replace ( / \n \s * \. / g, `.` )
@@ -73,7 +74,12 @@ angular.module('app').controller('trainingCtrl', function ($scope, $state, mainS
7374 . replace ( / \s + / g, ` ` ) ;
7475 console . log ( examples ) ;
7576 mainService . testExamples ( solutions , examples ) . then ( ( response ) => {
76- console . log ( response . data ) ;
77+ var t1 = performance . now ( ) ;
78+ $scope . answer = response . data . nest ;
79+ console . log ( response . data . nest [ 0 ] ) ;
80+ $scope . time = Math . round ( t1 - t0 ) + " ms" ;
81+ $scope . testPass = response . data . passCount ;
82+ $scope . testFail = response . data . testCount - response . data . passCount ;
7783 } ) ;
7884 } ;
7985
@@ -90,7 +96,6 @@ angular.module('app').controller('trainingCtrl', function ($scope, $state, mainS
9096 var t1 = performance . now ( ) ;
9197 $scope . answer = response . data . nest ;
9298 console . log ( response . data . nest [ 0 ] ) ;
93-
9499 $scope . time = Math . round ( t1 - t0 ) + " ms" ;
95100 $scope . testPass = response . data . passCount ;
96101 $scope . testFail = response . data . testCount - response . data . passCount ;
0 commit comments