File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
src/components/leaderboard Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,22 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
63
63
return 1 ;
64
64
}
65
65
return 0 ;
66
+ case 'execDuration' :
67
+ if ( row1 . execDuration ! < row2 . execDuration ! ) {
68
+ return - 1 ;
69
+ }
70
+ if ( row1 . execDuration ! > row2 . execDuration ! ) {
71
+ return 1 ;
72
+ }
73
+ return 0 ;
74
+ case 'memUsage' :
75
+ if ( row1 . memUsage ! < row2 . memUsage ! ) {
76
+ return - 1 ;
77
+ }
78
+ if ( row1 . memUsage ! > row2 . memUsage ! ) {
79
+ return 1 ;
80
+ }
81
+ return 0 ;
66
82
}
67
83
return 0 ;
68
84
}
@@ -223,7 +239,7 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
223
239
< th
224
240
scope = "col"
225
241
className = "dark:text-gray-100 px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
226
- onClick = { ( ) => setSortedField ( 'lintScore ' ) }
242
+ onClick = { ( ) => setSortedField ( 'memUsage ' ) }
227
243
>
228
244
< div className = "flex" >
229
245
Memory usage
@@ -237,7 +253,7 @@ const Leaderboard: React.FC<LeaderboardProps> = ({ benchmarkId }) => {
237
253
< th
238
254
scope = "col"
239
255
className = "dark:text-gray-100 px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
240
- onClick = { ( ) => setSortedField ( 'lintScore ' ) }
256
+ onClick = { ( ) => setSortedField ( 'execDuration ' ) }
241
257
>
242
258
< div className = "flex" >
243
259
Exec time
You can’t perform that action at this time.
0 commit comments