Run benchmarks 100 times and other 💄

This commit is contained in:
Nathan Sobo
2012-03-07 19:43:59 -07:00
parent f44a9df701
commit 4bfc09b18d
2 changed files with 4 additions and 2 deletions

View File

@@ -16,9 +16,11 @@ $(document).on 'close', -> window.close()
window.profile = (description, fn) ->
window.benchmark(description, fn, true)
window.pbenchmark = window.profile
window.benchmark = (description, fn, profile=false) ->
it description, ->
count = 50
count = 100
total = measure ->
console.profile(description) if profile
_.times count, fn

View File

@@ -12,7 +12,7 @@ describe "Editor", ->
afterEach ->
window.shutdown()
profile "inserting and deleting a character", ->
benchmark "inserting and deleting a character", ->
editor.hiddenInput.textInput('x')
editor.backspace()