Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort contest users with 0 points by submission count #2309

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

int-y1
Copy link
Contributor

@int-y1 int-y1 commented Jan 2, 2024

Fixes #650. When 2 users score 0 points, the user who submitted will appear first.

Screenshot 2024-01-02 003918

Also, using 'submission_cnt' will sort the users the other way.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (19e7a09) 46.84% compared to head (a6a1c52) 46.84%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2309   +/-   ##
=======================================
  Coverage   46.84%   46.84%           
=======================================
  Files         250      250           
  Lines       13275    13275           
=======================================
  Hits         6219     6219           
  Misses       7056     7056           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@kiritofeng kiritofeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@quantum5 quantum5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before we merge this, can we check to see how much worse the query is?

@kiritofeng
Copy link
Member

Tested against dmopc23c1, running in the prod database the difference is < 0.1s with 10 and 50 iterations as measured by timeit

@kiritofeng kiritofeng added this pull request to the merge queue Jan 6, 2024
Merged via the queue into DMOJ:master with commit c39f176 Jan 6, 2024
3 checks passed
@int-y1 int-y1 deleted the contest-0-order branch January 6, 2024 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contest leaderboard does not sort users with 0 points corectly
4 participants