« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rwxr-xr-xindex.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/index.js b/index.js
index f1073e0..c366ed7 100755
--- a/index.js
+++ b/index.js
@@ -100,6 +100,8 @@ async function main() {
     root.h = h
     root.fixAllLayout()
 
+    const XXstress = func => '[disabled]'
+
     const stress = func => {
       const start = Date.now()
       let n = 0
@@ -119,9 +121,16 @@ async function main() {
       root.fixAllLayout()
     })
 
+    const listings = appElement.tabber.tabberElements
+    const lastListing = listings[listings.length - 1]
+    const nBuildItems = stress(() => {
+      lastListing.buildItems()
+    })
+
     process.stdout.write(ansi.cleanCursor() + ansi.clearScreen() + '\n')
     console.log('# of times we can render & flush:', nRenderAndFlush)
     console.log('# of times we can fix all layout:', nFixAllLayout)
+    console.log('# of times we can build items:', nBuildItems)
 
     process.exit(0)