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

add timing log; add new where condition only get 7 days posts #336

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

ety001
Copy link
Member

@ety001 ety001 commented Sep 4, 2024

  • add timing log
  • add new where condition only get 7 days posts

@only-dev-time
Copy link
Contributor

only-dev-time commented Sep 4, 2024

I'll run my tester over it for a day to see how long the response times are compared to my test in August.

Edit after testing:
The most important results in comparison:

no. method and parameter description avg response time old (ms) avg response time new (ms) Improvment (ms) %
1 bridge.get_ranked_posts, sort trending, max limit 100, tag my, observer remlaps 21796 548 -21248 -97%
2 bridge.get_ranked_posts, sort created, max limit 100, tag my, observer remlaps 825 16225 +15400 +1867%
3 bridge.get_ranked_posts, sort trending, max limit 100, tag my, observer barski (following 16T) timeout 786 no more timeout -
4 bridge.get_ranked_posts, sort created, max limit 100, tag my, observer barski (following 16T) timeout timeout - -
5 bridge.get_ranked_posts, sort trending, max limit 100, tag hive-185836 = community trends timeout 681 no more timeout -
6 bridge.get_ranked_posts, sort created, max limit 100, tag hive-185836 = community trends 25863 timeout - -

Brief description of the test:
I sent various queries from the bridge_api every hour for one day. The queries are sent to my Hivemind test server. This excludes influences from other queries. The response time in min, max and average was then calculated for all responses.

The improvement in the requests with sort=trending (no. 1, 3, 5) can be seen very clearly. So the change had the desired effect here.

What surprises me, however, is the worsening of the requests with sort=created (no. 2, 4, 6). The change should have no effect at all on sort=created. At first I assumed network influences, but since this affects all created requests, I would exclude this.

Can anyone confirm this?

How ends your tests on logging level, @ety001?

10.09.2024: Update after repeating the test:
I measured the response times again with the code before the change and after the change. The test was performed on the same server (with address localhost). Network problems can therefore be ruled out.

@ety001
Copy link
Member Author

ety001 commented Sep 23, 2024

What surprises me, however, is the worsening of the requests with sort=created (no. 2, 4, 6). The change should have no effect at all on sort=created. At first I assumed network influences, but since this affects all created requests, I would exclude this.

@only-dev-time Hi, thank you for your test.

The sort=created is low visit in real situation. So I keep the origin logic of this.

Maybe we can add a one-month range condition on sort=created in future some time.

@yuekun0707 yuekun0707 merged commit f2d4cad into master Sep 24, 2024
@ety001 ety001 deleted the optimize_get_ranked_post branch September 24, 2024 04:41
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.

3 participants