Nir Soffer has posted comments on this change.
Change subject: profiling: Add an application wide profile
......................................................................
Patch Set 6:
(1 comment)
http://gerrit.ovirt.org/#/c/26113/6/vdsm/vdsm
File vdsm/vdsm:
Line 84: try:
Line 85: while running[0]:
Line 86: signal.pause()
Line 87:
Line 88: if config.getboolean('vars', 'profile_enable'):
Right - it is cleaner.
But wrong :-) since I import yappi only
if enabled.
I do this for two reasons. First, yappi is probably not available, and second, even if we
have yappi, I prefer not to import it if we don't need it, to ensure that we do not
effect the stability of the system.
Checking the config is equal to yappi.is_running() in the way we use it currently.
We can clean this up if I'll move the profiling code to another module, so in vdsm we
will see:
from vdsm import prof
...
prof.start_profiling(path)
...
prof.stop_profiling()
And the logic of importing yappi (or another profiler) will be encapsulated in the profile
module.
What do you think?
Line 89: logging.debug("Stopping profiling")
Line 90: yappi.stop()
Line 91: stats = yappi.get_func_stats()
Line 92: stats.save(constants.P_VDSM_RUN + 'vdsmd.prof',
--
To view, visit
http://gerrit.ovirt.org/26113
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I523f52c981f7bb34f3168d3117f00ed5eb6962f8
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes