-
New Feature Request
-
Resolution: Unresolved
-
Medium
-
None
-
5.2.1
When analyzing slow page generation in Debug section, we can see time spent for each SQL and can locate one when it's slow.
But, if source of slowdown is a lot of objects on some API calls, it's not clear what method took much time.
I believe it's possible to add at least time stamps when each API call is started, then we could calculate time difference.
Here is real trace of "Problem by severity" widget and my comments (on right):
# egrep "^[0-9]+\." widget_problem_by_severity.log
1. hostgroup.get [blocks.inc.php:85] <-- 130 groups obtained
2. problem.get [blocks.inc.php:150] <-- 8K problems obtained
3. trigger.get [blocks.inc.php:176] <-- 5K triggers obtained
4. problem.get [blocks.inc.php:233] <-- 700 problems obtained
5. alert.get [actions.inc.php:1467] <-- 56K alerts obtained
6. user.get [blocks.inc.php:271]
7. mediatype.get [blocks.inc.php:276]
8. host.get [triggers.inc.php:2137]
9. host.get [triggers.inc.php:2137]
10. host.get [triggers.inc.php:2137]
11. host.get [triggers.inc.php:2137]
12. host.get [triggers.inc.php:2137]
13. host.get [triggers.inc.php:2137]
14. host.get [triggers.inc.php:2137]
15. host.get [triggers.inc.php:2137]
This widget takes 80 seconds to be generated:
Total time: 79.392778 Total SQL time: 0.884856 SQL count: 62 (selects: 37 | executes: 34) Peak memory usage: 150M Memory limit: 2G
Would be nice to see cleanly what method is the most slow.