Commit b384c696ac9756ce87010f21e8d204b9c58eea2f

Authored by Luke Baker
1 parent 7aeba41b

increase number of appearances required for checking pre-generated cache hit rate

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/tasks/test_api.rake
@@ -374,7 +374,7 @@ namespace :test_api do @@ -374,7 +374,7 @@ namespace :test_api do
374 error_message += "Error! Question #{question.id} isn't tracking prompt cache hits and misses accurately! Expected #{yesterday_appearances}, Actual: #{misses+hits}, Hits: #{hits}, Misses: #{misses}\n" 374 error_message += "Error! Question #{question.id} isn't tracking prompt cache hits and misses accurately! Expected #{yesterday_appearances}, Actual: #{misses+hits}, Hits: #{hits}, Misses: #{misses}\n"
375 end 375 end
376 376
377 - if yesterday_appearances > 5 # this test isn't worthwhile for small numbers of appearances 377 + if yesterday_appearances > 25 # this test isn't worthwhile for small numbers of appearances
378 miss_rate = misses.to_f / yesterday_appearances.to_f 378 miss_rate = misses.to_f / yesterday_appearances.to_f
379 if miss_rate > 0.1 379 if miss_rate > 0.1
380 error_message += "Warning! Question #{question.id} has less than 90% of appearances taken from a pre-generated cache! Expected <#{0.1}, Actual: #{miss_rate}, total appearances yesterday: #{yesterday_appearances}\n" 380 error_message += "Warning! Question #{question.id} has less than 90% of appearances taken from a pre-generated cache! Expected <#{0.1}, Actual: #{miss_rate}, total appearances yesterday: #{yesterday_appearances}\n"