Add benchmark for moving to beginning of word at the end of a 9k line file

This commit is contained in:
Nathan Sobo
2012-04-09 15:52:08 -06:00
parent 0ad9e7b83b
commit 7ded50c19d
2 changed files with 9258 additions and 1 deletions

View File

@@ -33,10 +33,22 @@ describe "editor.", ->
describe "at-end.", ->
beforeEach ->
editor.setCursorScreenPosition([Infinity, Infinity])
editor.moveCursorToBottom()
benchmark "insert-delete", ->
editor.insertText('"')
editor.backspace()
describe "9000-line-file.", ->
describe "at-end.", ->
endPosition = null
beforeEach ->
editor.setBuffer new Buffer(require.resolve('fixtures/huge.js'))
editor.moveCursorToBottom()
endPosition = editor.getCursorScreenPosition()
console.log endPosition
fbenchmark "move-to-beginning-of-word", ->
editor.moveCursorToBeginningOfWord()
editor.setCursorScreenPosition(endPosition)

9245
benchmark/fixtures/huge.js Normal file

File diff suppressed because it is too large Load Diff