Skip to content

Commit

Permalink
Increase error reporting sample rate
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixeliot committed Aug 4, 2017
1 parent ef5f83b commit 3961ce4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/play/level/tome/SpellView.coffee
Expand Up @@ -903,7 +903,8 @@ module.exports = class SpellView extends CocoView
hashValue = aether.raw + aetherProblem.message
return if hashValue of @savedProblems
@savedProblems[hashValue] = true
return unless Math.random() < 0.01 # Let's only save a tiny fraction of these during HoC to reduce writes.
sampleRate = Math.max(1, (me.level()-2) * 2) * 0.01 # Reduce number of errors reported on earlier levels
return unless Math.random() < sampleRate

# Save new problem
@userCodeProblem = new UserCodeProblem()
Expand Down

0 comments on commit 3961ce4

Please sign in to comment.