Nir Soffer has posted comments on this change.

Change subject: profiling: Add an application wide profile
......................................................................


Patch Set 9:

(1 comment)

http://gerrit.ovirt.org/#/c/26113/9/lib/vdsm/profile.py
File lib/vdsm/profile.py:

Line 35: def start():
Line 36:     global yappi
Line 37:     if is_enabled():
Line 38:         logging.debug("Starting profiling")
Line 39:         import yappi
> shouldn't we use try: import yappi ...? Users can enable it without the pac
The config specify clearly:

    # Enable whole process profiling (requires yappi profiler).
    # profile_enable = false

If you ignore the note about yappi, (you know better) and enable the profile, 
vdsm will fail to start and you will get this traceback in the log:

  MainThread::ERROR::2014-05-02 22:27:56,152::vdsm::132::vds::(run) Exception 
raised
  Traceback (most recent call last):
    File "/usr/share/vdsm/vdsm", line 130, in run
      serve_clients(log)
    File "/usr/share/vdsm/vdsm", line 69, in serve_clients
      profile.start()
    File "/usr/lib64/python2.7/site-packages/vdsm/profile.py", line 39, in start
      import yappi
  ImportError: No module named yappi

How do you suggest to handle it differently?

In the future, when we have a yappi package, we can require yappi in vdsm spec.
Line 40:         yappi.start()
Line 41: 
Line 42: 
Line 43: def stop():


-- 
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: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to