File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,6 +143,21 @@ async function runPerformanceObserverBenchmarks () {
143143 mixedHasIndex ++ ;
144144 } , iterations ) ;
145145
146+ // keys()
147+ await timer . timeFunction ( "lru.keys" , ( ) => {
148+ phase2Cache . keys ( ) ;
149+ } , iterations ) ;
150+
151+ // values()
152+ await timer . timeFunction ( "lru.values" , ( ) => {
153+ phase2Cache . values ( ) ;
154+ } , iterations ) ;
155+
156+ // entries()
157+ await timer . timeFunction ( "lru.entries" , ( ) => {
158+ phase2Cache . entries ( ) ;
159+ } , iterations ) ;
160+
146161 let mixedDeleteIndex = 0 ;
147162 await timer . timeFunction ( "lru.delete" , ( ) => {
148163 const idx = deleteIndices [ mixedDeleteIndex % iterations ] ;
@@ -170,21 +185,6 @@ async function runPerformanceObserverBenchmarks () {
170185 // Phase 5: Additional API method benchmarks
171186 console . log ( "Phase 5: Additional API method benchmarks" ) ;
172187
173- // keys()
174- await timer . timeFunction ( "lru.keys" , ( ) => {
175- phase2Cache . keys ( ) ;
176- } , iterations ) ;
177-
178- // values()
179- await timer . timeFunction ( "lru.values" , ( ) => {
180- phase2Cache . values ( ) ;
181- } , iterations ) ;
182-
183- // entries()
184- await timer . timeFunction ( "lru.entries" , ( ) => {
185- phase2Cache . entries ( ) ;
186- } , iterations ) ;
187-
188188 // setWithEvicted()
189189 const setWithEvictedCache = lru ( 2 ) ;
190190 setWithEvictedCache . set ( "a" , "value_a" ) ;
You can’t perform that action at this time.
0 commit comments