From 95e9b836946864fa4117280a99ca9575d43836be Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 8 Mar 2012 13:04:07 -0700 Subject: [PATCH] Don't always show console, but bind a key for it and show when profiling --- benchmark/benchmark-helper.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/benchmark/benchmark-helper.coffee b/benchmark/benchmark-helper.coffee index 5d1d27fed..5a4e8de99 100644 --- a/benchmark/benchmark-helper.coffee +++ b/benchmark/benchmark-helper.coffee @@ -5,15 +5,18 @@ Keymap = require 'keymap' Point = require 'point' require 'window' -window.showConsole() keymap = new Keymap keymap.bindDefaultKeys() $(window).on 'keydown', (e) -> keymap.handleKeyEvent(e) -keymap.bindKeys '*', 'meta-w': 'close' +keymap.bindKeys '*', + 'meta-w': 'close' + 'alt-meta-i': 'show-console' $(document).on 'close', -> window.close() +$(document).on 'show-console', -> window.showConsole() window.profile = (description, fn) -> + window.showConsole() window.benchmark(description, fn, true) window.pbenchmark = window.profile