mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Run benchmarks 100 times and other 💄
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user