Add application:run-benchmarks command

This commit is contained in:
Corey Johnson 2013-09-05 15:13:23 -07:00
parent c5b56d4070
commit 249044e754
3 changed files with 9 additions and 1 deletions

View File

@ -2,4 +2,5 @@ require 'atom'
{runSpecSuite} = require 'jasmine-helper'
document.title = "Benchmark Suite"
runSpecSuite("benchmark-suite", true)
benchmarkSuite = require.resolve('./benchmark-suite')
runSpecSuite(benchmarkSuite, true)

View File

@ -116,6 +116,7 @@ class AtomApplication
handleEvents: ->
@on 'application:about', -> Menu.sendActionToFirstResponder('orderFrontStandardAboutPanel:')
@on 'application:run-all-specs', -> @runSpecs(exitWhenDone: false, resourcePath: global.devResourcePath)
@on 'application:run-benchmarks', -> @runBenchmarks()
@on 'application:show-settings', -> (@focusedWindow() ? this).openPath("atom://config")
@on 'application:quit', -> app.quit()
@on 'application:hide', -> Menu.sendActionToFirstResponder('hide:')
@ -272,6 +273,11 @@ class AtomApplication
devMode = true
new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specPath})
runBenchmarks: ->
bootstrapScript = 'benchmark/benchmark-bootstrap'
isSpec = true # So the spec folder is added to NODE_PATH
new AtomWindow({bootstrapScript, @resourcePath, isSpec})
# Private: Opens a native dialog to prompt the user for a path.
#
# Once paths are selected, they're opened in a new or existing {AtomWindow}s.

View File

@ -93,6 +93,7 @@ class RootView extends View
@command 'application:about', -> ipc.sendChannel('command', 'application:about')
@command 'application:run-all-specs', -> ipc.sendChannel('command', 'application:run-all-specs')
@command 'application:run-benchmarks', -> ipc.sendChannel('command', 'application:run-benchmarks')
@command 'application:show-settings', -> ipc.sendChannel('command', 'application:show-settings')
@command 'application:quit', -> ipc.sendChannel('command', 'application:quit')
@command 'application:hide', -> ipc.sendChannel('command', 'application:hide')