Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

[enh] measure response time with more details. #477

Closed
wants to merge 2 commits into from

Conversation

dalf
Copy link
Contributor

@dalf dalf commented Dec 25, 2015

First step to fix #162
The shown statistics are the same, except in memory there is a lot more information.
The second steps would be to re-implements UI. See https://github.com/dalf/searx/tree/metrology

Notes :

  • there is no tests
  • the stats are per unix process, so if there more than one as uwsgi does, it won't be accurate ( Inaccurate statistics #199 ). The current implementation has already this issue.
  • the idea of implementation.py is to add a redis / sql / whatever backend later. This would fix the previous note, except we have to take into account the speed. One idea : recording a measure only records an action to do later. A dedicate thread reads all these actions and executes them. Note : two unix processes equals two dedicated threads to record measures.

@pointhi
Copy link
Contributor

pointhi commented Dec 25, 2015

To share data between uwsgi threads we could propably using SharedArea?

@dalf
Copy link
Contributor Author

dalf commented Dec 25, 2015

I'm not sure about the score stats.

Also I saw a small issue with request time measure per engine : it's include the call to the request fonction (since it's based on params['started'] ).

Perhaps the per engine measure should also include the time out / error requests, after all if one engine has 20% of timeout each time the user has too wait for that.
But here there is an issue : how to get the params['started'] in the function wrapper (the one with the try / catch ).

After bring back the graph is not too difficult, nearly done actually except I would like to double check the consistency.

@pointhi : I don't know this projects why not. The only : measure response time mustn't be slow.

@dalf dalf added the core label Dec 25, 2015
@dalf
Copy link
Contributor Author

dalf commented Feb 8, 2016

In hurry, I mess up : I pushed the metrology2 branch to asciimoo/searx instead of dalf/searx and added my settings.yml...

By the way, there are the graphs in /stats2
Warning : all measures have to be checked, double checked, there is always tricky parts...

@asciimoo
Copy link
Member

asciimoo commented Feb 8, 2016

no problem, force push allowed on non-master branches =)
..and I'll check it, thanks

@return42
Copy link
Contributor

return42 commented Jan 19, 2021

@dalf what do you think about this PR? .. if it has a value, it might be better tagged as RFC .. otherwise close?

@dalf
Copy link
Contributor Author

dalf commented Jan 19, 2021

I've started to rewrite this PR because many things have changed since the time I wrote that PR.
I close this one and will open another PR,.

Also, I would like to keep the https://github.com/searx/searx/tree/metrology2 branch until the new one is pushed.

@dalf dalf closed this Jan 19, 2021
@dalf dalf mentioned this pull request Jan 30, 2021
@dalf dalf deleted the metrology2 branch April 27, 2021 06:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhanced stats-functions
4 participants