mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Add benchmark for moving to beginning of word at the end of a 9k line file
This commit is contained in:
@@ -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
9245
benchmark/fixtures/huge.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user