mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 10:56:53 -05:00
Add simulation throughput counter
This commit is contained in:
parent
475966fde7
commit
453c5759cc
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ async = require 'async'
|
||||||
bayes = new (require 'bayesian-battle')()
|
bayes = new (require 'bayesian-battle')()
|
||||||
LevelSession = require '../../levels/sessions/LevelSession'
|
LevelSession = require '../../levels/sessions/LevelSession'
|
||||||
User = require '../../users/User'
|
User = require '../../users/User'
|
||||||
|
perfmon = require '../../commons/perfmon'
|
||||||
|
|
||||||
SIMULATOR_VERSION = 3
|
SIMULATOR_VERSION = 3
|
||||||
|
|
||||||
|
@ -199,6 +200,7 @@ module.exports.updateUserSimulationCounts = (reqUserID, callback) ->
|
||||||
incrementUserSimulationCount reqUserID, 'simulatedBy', (err) =>
|
incrementUserSimulationCount reqUserID, 'simulatedBy', (err) =>
|
||||||
if err? then return callback err
|
if err? then return callback err
|
||||||
#console.log 'Incremented user simulation count!'
|
#console.log 'Incremented user simulation count!'
|
||||||
|
perfmon.client.increment 'simulations'
|
||||||
unless @isRandomMatch
|
unless @isRandomMatch
|
||||||
incrementUserSimulationCount @levelSession.creator, 'simulatedFor', callback
|
incrementUserSimulationCount @levelSession.creator, 'simulatedFor', callback
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue