       child.stdout.on 'data', (data) ->
         # inefficient but will do for now
         content += data.toString()
-        # console.log(data.toString())
       child.on 'exit', (code) =>
         m = (content.match '@@@STATSDUMPSTART@@@(.*)@@@STATSDUMPEND@@@')[1]
         m = m.replace('/home/vagrant/workspace', '/home/ivan/local/vm')

        curAttempt += 1
    ), 1000

    child.stdout.on 'data', (data) ->
      if data.toString().indexOf(dialtoneKey) isnt -1
        clearInterval dialtoneInterval

  profile: (cmd) ->
    deferred = Q.defer()

    child = spawn '/usr/bin/ssh', ["-p", "2222", "vagrant@127.0.0.1", "-i", "/home/ivan/.vagrant.d/insecure_private_key", "-t", "source ./dogweb/python/bin/activate; cd ./workspace/dogweb; paster shell development.ini"]

    cmd = [cmd, @dumpStatsCmd].join('\n')

