pcp
[Top] [All Lists]

[pcp] [python-pcp] Fix a bug in pmsubsys which causes timestamp to reset

To: performancecopilot/pcp <pcp@xxxxxxxxxxxxxxxxxx>
Subject: [pcp] [python-pcp] Fix a bug in pmsubsys which causes timestamp to reset. (#31)
From: marcliangma8 <notifications@xxxxxxxxxx>
Date: Thu, 16 Jul 2015 12:10:38 -0700
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=github.com; h=from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=1weusa/DObxJ0hDcTvFwVLkqJfo=; b=U+1Bp3TMdsXOPrTq HYOL8rd/xyP5dg20cULH4JqXEy2XvUPNX9cP4QyG6l3BmTW0D53oDaRO7FsUVk17 Xr6tFUW4wfMMznxXSYgQXHZckHYZzob7CgcuezABuu4YMsbx787v1fDeRccYQF1P lzZ240k9cXQqpYM8xJAShdKyxiI=
List-archive: https://github.com/performancecopilot/pcp
List-id: performancecopilot/pcp <pcp.performancecopilot.github.com>
List-post: <mailto:reply+00bd08b6fcc575c14b876d8a96f5b906d84716b73294b7ba92cf0000000111bfc3ae92a169ce05b147fe@reply.github.com>
List-unsubscribe: <mailto:unsub+00bd08b6fcc575c14b876d8a96f5b906d84716b73294b7ba92cf0000000111bfc3ae92a169ce05b147fe@reply.github.com>, <https://github.com/notifications/unsubscribe/AL0ItjY2G3RojgtGL9E0WPDPNGTB55rmks5od_kugaJpZM4FaJZu>
Reply-to: performancecopilot/pcp <reply+00bd08b6fcc575c14b876d8a96f5b906d84716b73294b7ba92cf0000000111bfc3ae92a169ce05b147fe@xxxxxxxxxxxxxxxx>

Problem:
pmFreeResult is used to free memory allocated by metric_result. However, it will corrupt memory and reset self._timestamp for diff calculation. So, all subsequent collections will have huge aggregated values instead of rate between intervals.

Fix:
Use copy.deepcopy to assign values for _timestamp which will survive from pmFreeResult call.


You can view, comment on, or merge this pull request online at:

  https://github.com/performancecopilot/pcp/pull/31

Commit Summary

  • [python-pcp] Fix a bug in pmsubsys which causes timestamp to reset.

File Changes

Patch Links:


Reply to this email directly or view it on GitHub.

<Prev in Thread] Current Thread [Next in Thread>
  • [pcp] [python-pcp] Fix a bug in pmsubsys which causes timestamp to reset. (#31), marcliangma8 <=