|
code
app/controllers/api/v1/contests_controller.rb:52
|
67%
|
app/controllers/api/v1/contests_controller.rb:52
- Average Self
-
71ms
- Average calls
- 1x
- Total Self
- 71ms
- Total Children
- 31ms
- Total runtime
- 103ms
Api::V1::ContestsController#results
|
|
sql
app/models/contest_service/ranker.rb:130
|
5%
|
app/models/contest_service/ranker.rb:130
- Average Self
-
0.53ms
- Average calls
- 11x
- Total Self
- 5.8ms
- Total Children
- 0ms
- Total runtime
- 5.8ms
SELECT `contest_routes`.* FROM `contest_routes` WHERE `contest_routes`.`id` = ? ORDER BY `contest_routes`.`number` ASC LIMIT ?
|
|
sql
app/models/contest_service/result.rb:62
|
5%
|
app/models/contest_service/result.rb:62
- Average Self
-
2.1ms
- Average calls
- 2.6x
- Total Self
- 5.5ms
- Total Children
- 0ms
- Total runtime
- 5.5ms
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:27
|
5%
|
app/models/contest_service/ranker.rb:27
- Average Self
-
2.9ms
- Average calls
- 1.7x
- Total Self
- 5ms
- Total Children
- 0ms
- Total runtime
- 5ms
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` = ?
|
|
sql
app/models/contest_service/result.rb:290
|
3%
|
app/models/contest_service/result.rb:290
- Average Self
-
3ms
- Average calls
- 1x
- Total Self
- 3ms
- Total Children
- 0ms
- Total runtime
- 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` = ?
|
|
sql
app/models/contest_service/ranker.rb:40
|
3%
|
app/models/contest_service/ranker.rb:40
- Average Self
-
2.9ms
- Average calls
- 0.93x
- Total Self
- 2.7ms
- Total Children
- 0ms
- Total runtime
- 2.7ms
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.top_attempt > ?) GROUP BY contest_participant_ascents.contest_route_id
|
|
code
/var/www/oblyk/api/shared/bundle/ruby/2.6.0/gems/railties-6.0.3.6/lib/rails/engine.rb:525
|
3%
|
/var/www/oblyk/api/shared/bundle/ruby/2.6.0/gems/railties-6.0.3.6/lib/rails/engine.rb:525
- Average Self
-
2.7ms
- Average calls
- 1x
- Total Self
- 2.7ms
- Total Children
- 103ms
- Total runtime
- 106ms
Rails::Engine#call
|
|
sql
app/controllers/api/v1/contests_controller.rb:148
|
2%
|
app/controllers/api/v1/contests_controller.rb:148
- Average Self
-
1.8ms
- Average calls
- 1x
- Total Self
- 1.8ms
- Total Children
- 0ms
- Total runtime
- 1.8ms
SELECT `gyms`.* FROM `gyms` WHERE (`gyms`.`deleted_at` IS NULL OR `gyms`.`deleted_at` > ?) AND `gyms`.`id` = ? LIMIT ?
|
|
sql
app/controllers/api/v1/contests_controller.rb:152
|
2%
|
app/controllers/api/v1/contests_controller.rb:152
- Average Self
-
1.7ms
- Average calls
- 1x
- Total Self
- 1.7ms
- Total Children
- 0ms
- Total runtime
- 1.7ms
SELECT `contests`.* FROM `contests` WHERE (`contests`.`deleted_at` IS NULL OR `contests`.`deleted_at` > ?) AND `contests`.`gym_id` = ? AND `contests`.`id` = ? LIMIT ?
|
|
sql
app/models/contest_service/result.rb:71
|
1%
|
app/models/contest_service/result.rb:71
- Average Self
-
1.6ms
- Average calls
- 0.84x
- Total Self
- 1.4ms
- Total Children
- 0ms
- Total runtime
- 1.4ms
SELECT `contest_stages`.* FROM `contest_stages` WHERE `contest_stages`.`contest_id` = ? ORDER BY `contest_stages`.`stage_order` ASC
|
|
sql
app/models/contest_service/result.rb:77
|
1%
|
app/models/contest_service/result.rb:77
- Average Self
-
1.6ms
- Average calls
- 0.8x
- Total Self
- 1.2ms
- Total Children
- 0ms
- Total runtime
- 1.2ms
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.42x
- Total Self
- 0.96ms
- Total Children
- 0ms
- Total runtime
- 0.96ms
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:43
|
<1%
|
app/models/contest_service/result.rb:43
- Average Self
-
1.9ms
- Average calls
- 0.42x
- Total Self
- 0.8ms
- Total Children
- 0ms
- Total runtime
- 0.8ms
SELECT COUNT(*) FROM `contest_stages` WHERE `contest_stages`.`contest_id` = ?
|
|
sql
app/models/contest_service/result.rb:263
|
<1%
|
app/models/contest_service/result.rb:263
- Average Self
-
1.7ms
- Average calls
- 0.42x
- Total Self
- 0.73ms
- Total Children
- 0ms
- Total runtime
- 0.73ms
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:316
|
<1%
|
app/models/contest_service/result.rb:316
- Average Self
-
1.7ms
- Average calls
- 0.42x
- Total Self
- 0.71ms
- Total Children
- 0ms
- Total runtime
- 0.71ms
SELECT `contest_teams`.* FROM `contest_teams` WHERE `contest_teams`.`contest_id` = ?
|
|
sql
app/models/contest_service/result.rb:55
|
<1%
|
app/models/contest_service/result.rb:55
- Average Self
-
1.4ms
- Average calls
- 0.42x
- Total Self
- 0.58ms
- Total Children
- 0ms
- Total runtime
- 0.58ms
SELECT `contest_categories`.* FROM `contest_categories` WHERE `contest_categories`.`contest_id` = ? ORDER BY `contest_categories`.`order` ASC
|