Skip to content

Team summary graph too aggressively switches over to grouping by days #507

@rbclark

Description

@rbclark

We recently added in code to switch over the Game Flag Submissions and Team Flag Submissions graphs over from grouping data by hours to grouping data by days automatically. When doing this I didn't take into account how slow/fast paced the game could be. The automatic switchover is after 7 days, and on one currently running competition the graphs now look as follows:

Screen Shot 2020-06-24 at 3 11 42 PM

Screen Shot 2020-06-24 at 3 12 03 PM

Instead of switching over automatically we basically need to add something similar to the following code

[:hours, :days].each do |period|
    @team_flags_per_hour = @team.submitted_flags_per_hour(period)
    @team_solves_per_hour = @team.solved_challenges_per_hour(period)
    break unless max(@team_flags_per_hour, @team_solves_per_hour) > THRESHOLD
end

We need to figure out what a reasonable THRESHOLD is above (probably by manually testing different amounts of data).

Also we need to rename submitted_flags_per_hour and solved_challenges_per_hour since they aren't really by hour anymore, they are by the period passed into them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions