Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 復習が多くなると一覧の表示に時間がかかる * パフォーマンステストを作成して,タグクラウドの生成処理を修正しました. ** closes #40
- Loading branch information
1 parent
4e18d9d
commit 800b6a7
Showing
7 changed files
with
47 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require 'test_helper' | ||
require 'performance_test_help' | ||
|
||
# タイムライン画面の負荷チェックを行います | ||
# | ||
# ユーザと復習数が増えるにつれて復習のページ表示が耐えられないほど遅く | ||
# なってきました. | ||
class TimelinesTest < ActionController::PerformanceTest | ||
def setup | ||
create_performance_test_data | ||
Rails.logger.level = ActiveSupport::BufferedLogger::DEBUG | ||
end | ||
|
||
def test_list | ||
puts "Reminder count #{Reminder.lists.size}" | ||
puts "Tag count #{Tag.count}" | ||
get '/timelines/list' | ||
end | ||
|
||
# def test_user_list | ||
# puts "Reminder count #{Reminder.lists.size}" | ||
# puts "Tag count #{Tag.count}" | ||
# get '/authorNari/list' | ||
# end | ||
|
||
private | ||
def create_performance_test_data | ||
1000.times do |i| | ||
reminder = Reminder.new(reminders(:list_reminder).attributes) | ||
reminder.tag_list = "#{rand(i).to_s} #{rand(i).to_s}" | ||
reminder.save! | ||
end | ||
end | ||
end |