A platform for community discussion. Free, open, simple.
FIX: ruby bench script no longer working
Sam819d4facda21
diff --git a/script/bench.rb b/script/bench.rbindex a93b44faa31..f474b02b5b5 100644--- a/script/bench.rb+++ b/script/bench.rb@@ -231,7 +231,7 @@ begintests = [["categories", "/categories"],["home", "/"],- ["topic", "/t/oh-how-i-wish-i-could-shut-up-like-a-tunnel-for-so/179"]+ ["topic", "/t/i-am-a-topic-used-for-perf-tests/179"]# ["user", "/u/admin1/activity"],]diff --git a/script/profile_db_generator.rb b/script/profile_db_generator.rbindex f75ba4910e3..8e5d8f139d1 100644--- a/script/profile_db_generator.rb+++ b/script/profile_db_generator.rb@@ -62,9 +62,17 @@ unless Rails.env == "profile"exitend+def ensure_perf_test_topic_has_right_title!+ t = Topic.find(179)+ t.title = "I am a topic used for perf tests"+ t.save! if t.title_changed?+end+# by default, Discourse has a "system" and `discobot` accountif User.count > 2puts "Only run this script against an empty DB"++ ensure_perf_test_topic_has_right_title!exitend@@ -110,3 +118,5 @@ end# no sidekiq so update some stuffCategory.update_statsJobs::PeriodicalUpdates.new.execute(nil)++ensure_perf_test_topic_has_right_title!