From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has posted comments on this change.
Change subject: [RFC] procutils: Introduce the procutils module
......................................................................
Patch Set 2:
(6 comments)
https://gerrit.ovirt.org/#/c/74927/2//COMMIT_MSG
Commit Message:
Line 3: AuthorDate: 2017-03-28 03:38:45 +0300
Line 4: Commit: Nir Soffer <nsoffer(a)redhat.com>
Line 5: CommitDate: 2017-03-31 05:18:48 +0300
Line 6:
Line 7: [RFC] procutils: Introduce the procutils module
I adapted this tag from qemu mailing list, seems like a good way to
tag thi
wip is the same thing.. is it wrong description for the work? if I would
suggest new header, I guess you would ask me to suggest it in the list first ..
Line 8:
Line 9: This module provide utilities for working with subprocesses.
Line 10:
Line 11: The first utility is procutils.communicate(), replacing both AsyncProc,
Line 5: CommitDate: 2017-03-31 05:18:48 +0300
Line 6:
Line 7: [RFC] procutils: Introduce the procutils module
Line 8:
Line 9: This module provide utilities for working with subprocesses.
Maybe we can move here helper slike utils.terminating()?
what
does it mean that it is based? did you copy it? can we reference to py3 code? why not to
backport the exact code?
Line 10:
Line 11: The first utility is procutils.communicate(), replacing both AsyncProc,
Line 12: and CommandStream. This function allows reading from 2 streams in the
Line 13: same time, without using callbacks as in CommandStream, and avoiding the
Line 36: test_asyncproc_write 1.00g in 13.71 seconds (0.07g/s) OK
Line 37: test_plain_read 1.00g in 0.45 seconds (2.22g/s) OK
Line 38: test_read 1.00g in 0.53 seconds (1.89g/s) OK
Line 39: test_write 1.00g in 0.49 seconds (2.04g/s) OK
Line 40:
I don't think so, if you want to buffer both stdout and stderr,
the builtin
mention it in the commit msg
Line 41: Change-Id: I7d193caa5da0ed564b4fab12aa85e3751f1a1df7
https://gerrit.ovirt.org/#/c/74927/8/lib/vdsm/common/procutils.py
File lib/vdsm/common/procutils.py:
Line 115: if timeout is not None:
Line 116: timeout = deadline - utils.monotonic_time()
Line 117: if timeout <= 0:
Line 118: raise TimeoutExpired(p.pid)
Line 119: if not fds:
deadline==timeout. call it timeout
Line 124
Line 125
Line 126
Line 127
Line 128
better to work with integers if such calculations are not mandatory. why don't you use
simpler counter?
Line 132
Line 133
Line 134
Line 135
Line 136
don't we care if it ended or timeouted?
--
To view, visit
https://gerrit.ovirt.org/74927
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7d193caa5da0ed564b4fab12aa85e3751f1a1df7
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Denis Chaplygin <dchaplyg(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes