forked from stuarthalloway/relevance-ruby-samples
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Replace modify_team.html.erb with a simple `render :text` statement - Update all cache logging examples to show Rails 2.1 output - Update fixtures to remove declaration of record IDs wherever possible
- Loading branch information
1 parent
d60e5d9
commit 2efece6
Showing
9 changed files
with
106 additions
and
114 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,88 +1,87 @@ | ||
# codecite nocache | ||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2007-10-26 13:47:57) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--2f18f5b4601093f9163734981d5905979f0347b9 | ||
Parameters: {"action"=>"show_team_cached", "id"=>"1", "controller"=>"baseball"} | ||
[4;36;1mTeam Columns (0.001908)[0m [0;1mSHOW FIELDS FROM teams[0m | ||
[4;35;1mTeam Load (0.000653)[0m [0mSELECT * FROM teams WHERE (teams.`id` = 1) [0m | ||
Rendering baseball/show_team_cached | ||
[4;36;1mPlayer Load (0.000659)[0m [0;1mSELECT players.* FROM players INNER JOIN contracts ON players.id = contracts.player_id WHERE ((contracts.team_id = 1)) [0m | ||
[4;35;1mPlayer Columns (0.001318)[0m [0mSHOW FIELDS FROM players[0m | ||
Completed in 0.01918 (52 reqs/sec) | Rendering: 0.00911 (47%) | DB: 0.00454 (23%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
Processing BaseballController#show_team (for 127.0.0.1 at 2008-09-22 15:31:49) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo | ||
SGFzaHsABjoKQHVzZWR7AA==--5e49bdf6639fdc26f216483d87894b99e8190efc | ||
Parameters: {"action"=>"show_team", "id"=>"1", "controller"=>"baseball"} | ||
Team Columns (0.001362) SHOW FIELDS FROM `teams` | ||
Team Load (0.002079) SELECT * FROM `teams` WHERE (`teams`.`id` = 1) | ||
Rendering baseball/show_team | ||
Player Load (0.000620) SELECT `players`.* FROM `players` INNER JOIN contracts ON players.id = contracts.player_id WHERE ((`contracts`.team_id = 1)) | ||
Player Columns (0.001569) SHOW FIELDS FROM `players` | ||
Completed in 0.02851 (35 reqs/sec) | Rendering: 0.01756 (61%) | DB: 0.00563 (19%) | 200 OK [http://localhost/baseball/show_team/1] | ||
|
||
|
||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2007-10-26 13:47:58) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--2f18f5b4601093f9163734981d5905979f0347b9 | ||
Parameters: {"action"=>"show_team_cached", "id"=>"1", "controller"=>"baseball"} | ||
[4;36;1mTeam Columns (0.002220)[0m [0;1mSHOW FIELDS FROM teams[0m | ||
[4;35;1mTeam Load (0.000505)[0m [0mSELECT * FROM teams WHERE (teams.`id` = 1) [0m | ||
Rendering baseball/show_team_cached | ||
[4;36;1mPlayer Load (0.000703)[0m [0;1mSELECT players.* FROM players INNER JOIN contracts ON players.id = contracts.player_id WHERE ((contracts.team_id = 1)) [0m | ||
[4;35;1mPlayer Columns (0.002214)[0m [0mSHOW FIELDS FROM players[0m | ||
Completed in 0.07678 (13 reqs/sec) | Rendering: 0.01308 (17%) | DB: 0.00564 (7%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
Processing BaseballController#show_team (for 127.0.0.1 at 2008-09-22 15:31:51) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo | ||
SGFzaHsABjoKQHVzZWR7AA==--5e49bdf6639fdc26f216483d87894b99e8190efc | ||
Parameters: {"action"=>"show_team", "id"=>"1", "controller"=>"baseball"} | ||
Team Columns (0.001369) SHOW FIELDS FROM `teams` | ||
Team Load (0.001876) SELECT * FROM `teams` WHERE (`teams`.`id` = 1) | ||
Rendering baseball/show_team | ||
Player Load (0.000683) SELECT `players`.* FROM `players` INNER JOIN contracts ON players.id = contracts.player_id WHERE ((`contracts`.team_id = 1)) | ||
Player Columns (0.001610) SHOW FIELDS FROM `players` | ||
Completed in 0.03088 (32 reqs/sec) | Rendering: 0.01993 (64%) | DB: 0.00554 (17%) | 200 OK [http://localhost/baseball/show_team/1] | ||
|
||
|
||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2007-10-26 13:48:41) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--2f18f5b4601093f9163734981d5905979f0347b9 | ||
Parameters: {"action"=>"show_team_cached", "id"=>"1", "controller"=>"baseball"} | ||
[4;36;1mSQL (0.000170)[0m [0;1mSET NAMES 'utf8'[0m | ||
[4;35;1mSQL (0.000087)[0m [0mSET SQL_AUTO_IS_NULL=0[0m | ||
Fragment read: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
[4;36;1mTeam Columns (0.002082)[0m [0;1mSHOW FIELDS FROM teams[0m | ||
[4;35;1mTeam Load (0.000499)[0m [0mSELECT * FROM teams WHERE (teams.`id` = 1) [0m | ||
Rendering baseball/show_team_cached | ||
Fragment read: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
[4;36;1mPlayer Load (0.000692)[0m [0;1mSELECT players.* FROM players INNER JOIN contracts ON players.id = contracts.player_id WHERE ((contracts.team_id = 1)) [0m | ||
[4;35;1mPlayer Columns (0.001642)[0m [0mSHOW FIELDS FROM players[0m | ||
Cached fragment: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
Completed in 0.02443 (40 reqs/sec) | Rendering: 0.01267 (51%) | DB: 0.00517 (21%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
Processing BaseballController#show_team (for 127.0.0.1 at 2008-09-22 15:31:52) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo | ||
SGFzaHsABjoKQHVzZWR7AA==--5e49bdf6639fdc26f216483d87894b99e8190efc | ||
Parameters: {"action"=>"show_team", "id"=>"1", "controller"=>"baseball"} | ||
Team Columns (0.001347) SHOW FIELDS FROM `teams` | ||
Team Load (0.001851) SELECT * FROM `teams` WHERE (`teams`.`id` = 1) | ||
Rendering baseball/show_team | ||
Player Load (0.000688) SELECT `players`.* FROM `players` INNER JOIN contracts ON players.id = contracts.player_id WHERE ((`contracts`.team_id = 1)) | ||
Player Columns (0.001630) SHOW FIELDS FROM `players` | ||
Completed in 0.03050 (32 reqs/sec) | Rendering: 0.01949 (63%) | DB: 0.00552 (18%) | 200 OK [http://localhost/baseball/show_team/1] | ||
# codecite nocache | ||
|
||
# codecite fragment | ||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2007-10-26 13:49:24) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--2f18f5b4601093f9163734981d5905979f0347b9 | ||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2008-09-22 15:33:28) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo | ||
SGFzaHsABjoKQHVzZWR7AA==--5e49bdf6639fdc26f216483d87894b99e8190efc | ||
Parameters: {"action"=>"show_team_cached", "id"=>"1", "controller"=>"baseball"} | ||
[4;36;1mSQL (0.000100)[0m [0;1mSET NAMES 'utf8'[0m | ||
[4;35;1mSQL (0.000084)[0m [0mSET SQL_AUTO_IS_NULL=0[0m | ||
Fragment read: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
[4;36;1mTeam Columns (0.002063)[0m [0;1mSHOW FIELDS FROM teams[0m | ||
[4;35;1mTeam Load (0.000558)[0m [0mSELECT * FROM teams WHERE (teams.`id` = 1) [0m | ||
SQL (0.000229) SET NAMES 'utf8' | ||
SQL (0.000110) SET SQL_AUTO_IS_NULL=0 | ||
Cached fragment hit: views/localhost:3001/baseball/show_team_cached/1 (0.00002) | ||
Team Columns (0.002073) SHOW FIELDS FROM `teams` | ||
Team Load (0.000305) SELECT * FROM `teams` WHERE (`teams`.`id` = 1) | ||
Rendering baseball/show_team_cached | ||
Fragment read: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
[4;36;1mPlayer Load (0.000742)[0m [0;1mSELECT players.* FROM players INNER JOIN contracts ON players.id = contracts.player_id WHERE ((contracts.team_id = 1)) [0m | ||
[4;35;1mPlayer Columns (0.001458)[0m [0mSHOW FIELDS FROM players[0m | ||
Cached fragment: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
Completed in 0.02462 (40 reqs/sec) | Rendering: 0.01339 (54%) | DB: 0.00500 (20%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
Cached fragment hit: views/localhost:3001/baseball/show_team_cached/1 (0.00002) | ||
Player Load (0.000593) SELECT `players`.* FROM `players` INNER JOIN contracts ON players.id = contracts.player_id WHERE ((`contracts`.team_id = 1)) | ||
Player Columns (0.001045) SHOW FIELDS FROM `players` | ||
Cached fragment miss: views/localhost:3001/baseball/show_team_cached/1 (0.00002) | ||
Completed in 0.03046 (32 reqs/sec) | Rendering: 0.01770 (58%) | DB: 0.00436 (14%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
|
||
|
||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2007-10-26 13:49:25) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--2f18f5b4601093f9163734981d5905979f0347b9 | ||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2008-09-22 15:33:29) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo | ||
SGFzaHsABjoKQHVzZWR7AA==--5e49bdf6639fdc26f216483d87894b99e8190efc | ||
Parameters: {"action"=>"show_team_cached", "id"=>"1", "controller"=>"baseball"} | ||
Fragment read: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
Cached fragment hit: views/localhost:3001/baseball/show_team_cached/1 (0.00002) | ||
Rendering baseball/show_team_cached | ||
Fragment read: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
Completed in 0.00235 (425 reqs/sec) | Rendering: 0.00077 (32%) | DB: 0.00000 (0%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
Cached fragment hit: views/localhost:3001/baseball/show_team_cached/1 (0.00001) | ||
Completed in 0.00231 (433 reqs/sec) | Rendering: 0.00060 (25%) | DB: 0.00000 (0%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
|
||
|
||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2007-10-26 13:49:25) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--2f18f5b4601093f9163734981d5905979f0347b9 | ||
Processing BaseballController#show_team_cached (for 127.0.0.1 at 2008-09-22 15:33:31) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo | ||
SGFzaHsABjoKQHVzZWR7AA==--5e49bdf6639fdc26f216483d87894b99e8190efc | ||
Parameters: {"action"=>"show_team_cached", "id"=>"1", "controller"=>"baseball"} | ||
Fragment read: localhost:3000/baseball/show_team_cached/1 (0.00007) | ||
Cached fragment hit: views/localhost:3001/baseball/show_team_cached/1 (0.00002) | ||
Rendering baseball/show_team_cached | ||
Fragment read: localhost:3000/baseball/show_team_cached/1 (0.00002) | ||
Completed in 0.00263 (380 reqs/sec) | Rendering: 0.00074 (28%) | DB: 0.00000 (0%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
# codecite fragment | ||
Cached fragment hit: views/localhost:3001/baseball/show_team_cached/1 (0.00001) | ||
Completed in 0.00233 (429 reqs/sec) | Rendering: 0.00058 (24%) | DB: 0.00000 (0%) | 200 OK [http://localhost/baseball/show_team_cached/1] | ||
|
||
# codecite query cache | ||
Processing BaseballController#modify_team (for 127.0.0.1 at 2007-10-26 14:43:41) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--2f18f5b4601093f9163734981d5905979f0347b9 | ||
Processing BaseballController#modify_team (for 127.0.0.1 at 2008-09-22 15:48:32) [GET] | ||
Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo | ||
SGFzaHsABjoKQHVzZWR7AA==--5e49bdf6639fdc26f216483d87894b99e8190efc | ||
Parameters: {"action"=>"modify_team", "id"=>"1", "controller"=>"baseball"} | ||
[4;35;1mTeam Columns (0.002146)[0m [0mSHOW FIELDS FROM teams[0m | ||
[4;36;1mTeam Load (0.000697)[0m [0;1mSELECT * FROM teams WHERE (teams.`id` = 1) [0m | ||
[4;35;1mCACHE (0.000000)[0m [0mSELECT * FROM teams WHERE (teams.`id` = 1) [0m | ||
[4;36;1mSQL (0.000119)[0m [0;1mBEGIN[0m | ||
[4;35;1mTeam Update (0.000275)[0m [0mUPDATE teams SET `created_at` = '2007-10-23 11:28:33', `city` = 'Boston', `updated_at` = '2007-10-26 14:43:41', `name` = 'New Name' WHERE `id` = 1[0m | ||
[4;36;1mSQL (0.000337)[0m [0;1mCOMMIT[0m | ||
[4;35;1mTeam Load (0.000262)[0m [0mSELECT * FROM teams WHERE (teams.`id` = 1) [0m | ||
Rendering baseball/modify_team | ||
Completed in 0.01346 (74 reqs/sec) | Rendering: 0.00101 (7%) | DB: 0.00384 (28%) | 200 OK [http://localhost/baseball/modify_team/1] | ||
# codecite query cache | ||
Team Columns (0.001319) SHOW FIELDS FROM `teams` | ||
Team Load (0.000625) SELECT * FROM `teams` WHERE (`teams`.`id` = 1) | ||
CACHE (0.000000) SELECT * FROM `teams` WHERE (`teams`.`id` = 1) | ||
SQL (0.000076) BEGIN | ||
Team Update (0.000194) UPDATE `teams` SET `updated_at` = '2008-09-22 19:48:32', `name` = '2008-09-22 15:48:32' WHERE `id` = 1 | ||
SQL (0.000542) COMMIT | ||
Team Load (0.000146) SELECT * FROM `teams` WHERE (`teams`.`id` = 1) | ||
Completed in 0.01017 (98 reqs/sec) | Rendering: 0.00021 (2%) | DB: 0.00290 (28%) | 200 OK [http://localhost/baseball/modify_team/1] |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
# codecite many | ||
<% (1..200).each do |i| %> | ||
team_<%= i %>: | ||
id: <%= i %> | ||
name: Team <%= i %> | ||
City: Random | ||
<% end %> | ||
# codecite many | ||
|
||
# codecite fixtures | ||
redsox: | ||
name: Red Sox | ||
city: Boston | ||
yankees: | ||
name: Yankees | ||
city: New York | ||
|
||
# codecite fixtures | ||
|
||
# codecite many | ||
<% (3..200).each do |i| %> | ||
team_<%= i %>: | ||
name: Team <%= i %> | ||
City: Random | ||
<% end %> | ||
# codecite many |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
# codecite many | ||
<% (1..200).each do |i| %> | ||
team_<%= i %>: | ||
id: <%= i %> | ||
name: Team <%= i %> | ||
City: Random | ||
<% end %> | ||
# codecite many | ||
|
||
# codecite fixtures | ||
redsox: | ||
name: Red Sox | ||
city: Boston | ||
yankees: | ||
name: Yankees | ||
city: New York | ||
|
||
# codecite fixtures | ||
|
||
# codecite many | ||
<% (3..200).each do |i| %> | ||
team_<%= i %>: | ||
name: Team <%= i %> | ||
City: Random | ||
<% end %> | ||
# codecite many |