Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-27 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 8:

* update_tracker: OK
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-20 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 7:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-19 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 6:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-15 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 5:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-14 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 4:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-14 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 3:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-14 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 2:

(2 comments)

Looks good, decorator module is 30 times slower, but the cost per call is only 
about 60 microseconds, worth the cleanup in the code.

https://gerrit.ovirt.org/#/c/63833/2/tests/api_test.py
File tests/api_test.py:

Line 60: def foobar(x, y, z):
Line 61: pass
Line 62: """
Line 63: print("decorator method speed penalty:")
Line 64: print("with just functools.wraps: %s" % (
This would be more useful:

%.6f
Line 65: timeit.timeit(bench, setup=baseline, number=1000)
Line 66: ))
Line 67: print("with the decorator module: %s" % (
Line 68: timeit.timeit(bench, setup=preserving, number=1000)


Line 61: pass
Line 62: """
Line 63: print("decorator method speed penalty:")
Line 64: print("with just functools.wraps: %s" % (
Line 65: timeit.timeit(bench, setup=baseline, number=1000)
And calculating time per call:

 (timeit.timeit(..., number=number) / number)
Line 66: ))
Line 67: print("with the decorator module: %s" % (
Line 68: timeit.timeit(bench, setup=preserving, number=1000)
Line 69: ))


-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-14 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 2:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-14 Thread fromani
Francesco Romani has uploaded a new change for review.

Change subject: WIP benchmark decorator module speed
..

WIP benchmark decorator module speed

Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Signed-off-by: Francesco Romani 
---
M tests/api_test.py
1 file changed, 33 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/63833/1

diff --git a/tests/api_test.py b/tests/api_test.py
index 1f4fbf0..0fe5612 100644
--- a/tests/api_test.py
+++ b/tests/api_test.py
@@ -17,8 +17,9 @@
 #
 # Refer to the README and COPYING files for full details of the license
 #
-
+from __future__ import print_function
 import inspect
+import timeit
 
 from vdsm import exception
 from vdsm import response
@@ -37,6 +38,37 @@
 self.assertEqual(args.varargs, None)
 self.assertEqual(args.keywords, None)
 
+def test_speed(self):
+baseline = """
+from functools import wraps
+
+def deco(func):
+@wraps(func)
+def _inner(*args, **kwargs):
+return func(*args, **kwargs)
+return _inner
+"""
+preserving = """
+from decorator import decorator
+
+@decorator
+def deco(func, *args, **kweargs):
+return func(*args, **kwargs)
+"""
+bench = """
+@deco
+def foobar(x, y, z):
+pass
+"""
+print("decorator method speed penalty:")
+print("with just functools.wraps: %s" % (
+timeit.timeit(bench, setup=baseline, number=1000)
+))
+print("with the decorator module: %s" % (
+timeit.timeit(bench, setup=preserving, number=1000)
+))
+print("")
+
 
 class TestResponse(TestCaseBase):
 


-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: WIP benchmark decorator module speed

2016-09-14 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: WIP benchmark decorator module speed
..


Patch Set 1:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org