|
code
app/controllers/api/v1/contests_controller.rb:52
|
76%
|
app/controllers/api/v1/contests_controller.rb:52
- Average Self
-
143ms
- Average calls
- 1x
- Total Self
- 143ms
- Total Children
- 42ms
- Total runtime
- 186ms
Api::V1::ContestsController#results
|
|
sql
app/models/contest_service/ranker.rb:27
|
4%
|
app/models/contest_service/ranker.rb:27
- Average Self
-
3.4ms
- Average calls
- 2.3x
- Total Self
- 8ms
- Total Children
- 0ms
- Total runtime
- 8ms
SELECT `contest_participant_ascents`.`id`, `contest_participant_ascents`.`contest_participant_id`, `contest_participant_ascents`.`contest_route_id`, `contest_participant_ascents`.`top_attempt`, `contest_participant_ascents`.`zone_1_attempt` FROM `contest_participant_ascents` INNER JOIN `contest_participants` ON `contest_participants`.`id` = `contest_participant_ascents`.`contest_participant_id` INNER JOIN `contest_routes` ON `contest_routes`.`id` = `contest_participant_ascents`.`contest_route_id` INNER JOIN `contest_route_groups` ON `contest_route_groups`.`id` = `contest_routes`.`contest_route_group_id` WHERE `contest_participants`.`contest_category_id` = ? AND `contest_routes`.`disabled_at` IS NULL AND `contest_route_groups`.`contest_stage_step_id` = ? AND `contest_participants`.`genre` = ?
|
|
sql
app/models/contest_service/result.rb:62
|
4%
|
app/models/contest_service/result.rb:62
- Average Self
-
2.2ms
- Average calls
- 3.3x
- Total Self
- 7.2ms
- Total Children
- 0ms
- Total runtime
- 7.2ms
SELECT `contest_participants`.* FROM `contest_participants` INNER JOIN `contest_categories` ON `contest_participants`.`contest_category_id` = `contest_categories`.`id` WHERE `contest_categories`.`contest_id` = ? AND `contest_participants`.`contest_category_id` = ? ORDER BY `contest_participants`.`id` ASC LIMIT ?
|
|
sql
app/models/contest_service/ranker.rb:130
|
4%
|
app/models/contest_service/ranker.rb:130
- Average Self
-
0.67ms
- Average calls
- 10x
- Total Self
- 7.1ms
- Total Children
- 0ms
- Total runtime
- 7.1ms
SELECT `contest_routes`.* FROM `contest_routes` WHERE `contest_routes`.`id` = ? ORDER BY `contest_routes`.`number` ASC LIMIT ?
|
|
sql
app/models/contest_service/ranker.rb:40
|
2%
|
app/models/contest_service/ranker.rb:40
- Average Self
-
3.8ms
- Average calls
- 1.2x
- Total Self
- 4.4ms
- Total Children
- 0ms
- Total runtime
- 4.4ms
SELECT COUNT(*) AS count_all, contest_participant_ascents.contest_route_id AS contest_participant_ascents_contest_route_id FROM `contest_participant_ascents` INNER JOIN `contest_participants` ON `contest_participants`.`id` = `contest_participant_ascents`.`contest_participant_id` INNER JOIN `contest_routes` ON `contest_routes`.`id` = `contest_participant_ascents`.`contest_route_id` INNER JOIN `contest_route_groups` ON `contest_route_groups`.`id` = `contest_routes`.`contest_route_group_id` WHERE `contest_participants`.`contest_category_id` = ? AND `contest_routes`.`disabled_at` IS NULL AND `contest_route_groups`.`contest_stage_step_id` = ? AND `contest_participant_ascents`.`realised` = TRUE AND `contest_participants`.`genre` = ? GROUP BY contest_participant_ascents.contest_route_id
|
|
sql
app/models/contest_service/result.rb:290
|
2%
|
app/models/contest_service/result.rb:290
- Average Self
-
3.3ms
- Average calls
- 1x
- Total Self
- 3.3ms
- Total Children
- 0ms
- Total runtime
- 3.3ms
SELECT MAX(`contest_participant_ascents`.`registered_at`) FROM `contest_participant_ascents` INNER JOIN `contest_participants` ON `contest_participant_ascents`.`contest_participant_id` = `contest_participants`.`id` INNER JOIN `contest_categories` ON `contest_participants`.`contest_category_id` = `contest_categories`.`id` WHERE `contest_categories`.`contest_id` = ?
|
|
code
/var/www/oblyk/api/shared/bundle/ruby/2.6.0/gems/railties-6.0.3.6/lib/rails/engine.rb:525
|
1%
|
/var/www/oblyk/api/shared/bundle/ruby/2.6.0/gems/railties-6.0.3.6/lib/rails/engine.rb:525
- Average Self
-
2.4ms
- Average calls
- 1x
- Total Self
- 2.4ms
- Total Children
- 186ms
- Total runtime
- 188ms
Rails::Engine#call
|
|
sql
app/models/contest_service/result.rb:71
|
1%
|
app/models/contest_service/result.rb:71
- Average Self
-
1.7ms
- Average calls
- 1.2x
- Total Self
- 2ms
- Total Children
- 0ms
- Total runtime
- 2ms
SELECT `contest_stages`.* FROM `contest_stages` WHERE `contest_stages`.`contest_id` = ? ORDER BY `contest_stages`.`stage_order` ASC
|
|
sql
app/controllers/api/v1/contests_controller.rb:152
|
1%
|
app/controllers/api/v1/contests_controller.rb:152
- Average Self
-
1.9ms
- Average calls
- 1x
- Total Self
- 1.9ms
- Total Children
- 0ms
- Total runtime
- 1.9ms
SELECT `contests`.* FROM `contests` WHERE (`contests`.`deleted_at` IS NULL OR `contests`.`deleted_at` > ?) AND `contests`.`gym_id` = ? AND `contests`.`id` = ? LIMIT ?
|
|
sql
app/controllers/api/v1/contests_controller.rb:148
|
<1%
|
app/controllers/api/v1/contests_controller.rb:148
- Average Self
-
1.7ms
- Average calls
- 1x
- Total Self
- 1.7ms
- Total Children
- 0ms
- Total runtime
- 1.7ms
SELECT `gyms`.* FROM `gyms` WHERE (`gyms`.`deleted_at` IS NULL OR `gyms`.`deleted_at` > ?) AND `gyms`.`id` = ? LIMIT ?
|
|
sql
app/models/contest_service/result.rb:77
|
<1%
|
app/models/contest_service/result.rb:77
- Average Self
-
1.4ms
- Average calls
- 1.1x
- Total Self
- 1.5ms
- Total Children
- 0ms
- Total runtime
- 1.5ms
SELECT `contest_stage_steps`.* FROM `contest_stage_steps` WHERE `contest_stage_steps`.`contest_stage_id` = ? ORDER BY `contest_stage_steps`.`step_order` ASC
|
|
sql
app/models/contest_service/result.rb:251
|
<1%
|
app/models/contest_service/result.rb:251
- Average Self
-
2.3ms
- Average calls
- 0.58x
- Total Self
- 1.3ms
- Total Children
- 0ms
- Total runtime
- 1.3ms
SELECT `contest_participant_steps`.`id`, `contest_participant_steps`.`contest_stage_step_id`, `contest_participant_steps`.`contest_participant_id` FROM `contest_participant_steps` INNER JOIN `contest_stage_steps` ON `contest_stage_steps`.`id` = `contest_participant_steps`.`contest_stage_step_id` INNER JOIN `contest_stages` ON `contest_stages`.`id` = `contest_stage_steps`.`contest_stage_id` WHERE `contest_stages`.`contest_id` = ?
|
|
sql
app/models/contest_service/result.rb:316
|
<1%
|
app/models/contest_service/result.rb:316
- Average Self
-
2ms
- Average calls
- 0.58x
- Total Self
- 1.2ms
- Total Children
- 0ms
- Total runtime
- 1.2ms
SELECT `contest_teams`.* FROM `contest_teams` WHERE `contest_teams`.`contest_id` = ?
|
|
sql
app/models/contest_service/result.rb:263
|
<1%
|
app/models/contest_service/result.rb:263
- Average Self
-
1.9ms
- Average calls
- 0.58x
- Total Self
- 1.1ms
- Total Children
- 0ms
- Total runtime
- 1.1ms
SELECT contest_stage_steps.id AS contest_stage_step_id, contest_route_group_categories.contest_category_id FROM `contest_route_group_categories` INNER JOIN `contest_route_groups` ON `contest_route_groups`.`id` = `contest_route_group_categories`.`contest_route_group_id` INNER JOIN `contest_stage_steps` ON `contest_stage_steps`.`id` = `contest_route_groups`.`contest_stage_step_id` INNER JOIN `contest_stages` ON `contest_stages`.`id` = `contest_stage_steps`.`contest_stage_id` WHERE `contest_stages`.`contest_id` = ?
|
|
sql
app/models/contest_service/result.rb:43
|
<1%
|
app/models/contest_service/result.rb:43
- Average Self
-
1.7ms
- Average calls
- 0.58x
- Total Self
- 1ms
- Total Children
- 0ms
- Total runtime
- 1ms
SELECT COUNT(*) FROM `contest_stages` WHERE `contest_stages`.`contest_id` = ?
|
|
sql
app/models/contest_service/result.rb:55
|
<1%
|
app/models/contest_service/result.rb:55
- Average Self
-
1.6ms
- Average calls
- 0.58x
- Total Self
- 0.92ms
- Total Children
- 0ms
- Total runtime
- 0.92ms
SELECT `contest_categories`.* FROM `contest_categories` WHERE `contest_categories`.`contest_id` = ? ORDER BY `contest_categories`.`order` ASC
|