Change in vdsm[master]: utils: Optimize namedtuple definition in pidStat

danken at redhat.com danken at redhat.com
Fri Mar 28 14:19:12 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: utils: Optimize namedtuple definition in pidStat
......................................................................


utils: Optimize namedtuple definition in pidStat

Profiling idle vdsm reveal that 60% of cpu time is spent in creating
pointless namedtuples. In particular, 823 calls were made in 4.88
seconds of cpu time, invoking collections.py genexpr function 296805
times.

This patch creates the one and only namedtuple needed by pidStat when
the module is imported.

Change-Id: Ic5841b338cc0e9376c3bd7815206c27829c286d6
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/26097
Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
---
M lib/vdsm/utils.py
1 file changed, 14 insertions(+), 12 deletions(-)

Approvals:
  Nir Soffer: Verified
  Yaniv Bronhaim: Looks good to me, but someone else must approve
  Antoni Segura Puimedon: Looks good to me, but someone else must approve
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.ovirt.org/26097
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5841b338cc0e9376c3bd7815206c27829c286d6
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list