Compare_lplib_pylpbugs

Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2008-08-09 09:56:28
Size: 2162
Editor: a89-182-31-135
Comment:
Revision 8 as of 2009-01-07 09:03:20
Size: 5528
Editor: a89-182-28-4
Comment:
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:
(read-only access)
Line 22: Line 24:
>>> Bug.set_connection_mode(<SERVER-const>)
}}}

=== python-launchpad-bugs (html) ===

(this connection mode is used for write-access)

{{{
>>> Bug = ConnectBug("html")
>>> Bug.authentication = <cookie-file>
Line 29: Line 41:
==== Versions ====
Line 33: Line 46:
==== Results ====
Line 35: Line 50:
|| ''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <<BR>> {{{ >>> print b.description }}} || 10 loops, best of 3: 638 ms per loop <<BR>> 25 loops, best of 3: 641 ms per loop|| 10 loops, best of 3: 808 ms per loop <<BR>> 25 loops, best of 3: 762 ms per loop || ||<rowbgcolor="lightgreen;"> ''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <<BR>> {{{ >>> print b.description }}} || 10 loops, best of 3: 638 ms per loop <<BR>> 25 loops, best of 3: 641 ms per loop|| 10 loops, best of 3: 808 ms per loop <<BR>> 25 loops, best of 3: 762 ms per loop ||
Line 37: Line 52:
|| ''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <<BR>> {{{ >>> print [t.status for t in b.infotable] }}} || 10 loops, best of 3: 641 ms per loop <<BR>> 25 loops, best of 3: 639 ms per loop || 10 loops, best of 3: 756 ms per loop <<BR>> 25 loops, best of 3: 751 ms per loop || ||<rowbgcolor="lightgreen;"> ''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <<BR>> {{{ >>> print [t.status for t in b.infotable] }}} || 10 loops, best of 3: 641 ms per loop <<BR>> 25 loops, best of 3: 639 ms per loop || 10 loops, best of 3: 756 ms per loop <<BR>> 25 loops, best of 3: 751 ms per loop ||
||<rowspan=2> '''change status of first task of #255634''' || ''py-lp-bugs (html)'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <<BR>> {{{ >>> b = Bug(255634) }}} <<BR>> {{{ >>> task = b.infotable[0] }}} <<BR>> {{{ >>> task.status = status_map[task.status] }}} <<BR>> {{{ >>> b.commit() }}} || <<BR>> || 10 loops, best of 3: 6.83 s per loop <<BR>> 25 loops, best of 3: 6.33 s per loop ||
||<rowbgcolor="lightgreen;"> ''launchpadlib'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <<BR>> {{{ >>> b = launchpad.bugs[255634] }}} <<BR>> {{{ >>> task = list(b.bug_tasks)[0] }}} <<BR>> {{{ >>> task.transitionToStatus(status=status_map[task.status]) }}} || <<BR>> || 10 loops, best of 3: 3.66 s per loop <<BR>> 25 loops, best of 3: 4.51 s per loop ||

==== Conclusion ====
 * for read-only access python-launchpad-bugs in the ''text'' mode is about three times faster than launchpadlib
 * write-access with launchpadlib is two times faster than python-launchpad-bugs in the ''html'' mode
Line 40: Line 61:
=== 20080821 ===

==== Versions ====
'''launchpadlib:''' lp:launchpadlib (rev13)

'''wadllib:''' lp:wadllib (rev6)

'''python-launchpad-bugs:''' lp:python-launchpad-bugs (rev152)

==== Results ====

|| '''Task''' || '''Lib''' || '''Code''' || '''STAGING''' || '''EDGE''' ||
||<rowspan=2> '''get description of #123456''' || ''launchpadlib'' || {{{ >>> b = launchpad.bugs[123456] }}} <<BR>> {{{ >>> print b.description }}}|| || 10 loops, best of 3: 189 ms per loop <<BR>> 25 loops, best of 3: 197 ms per loop ||
||''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <<BR>> {{{ >>> print b.description }}} || || ||
||<rowspan=2> '''get status of all tasks of #123456''' || ''launchpadlib'' || {{{ >>> b = launchpad.bugs[123456] }}} <<BR>> {{{ >>> print [t.status for t in b.bug_tasks] }}}|| || ||
||''py-lp-bugs (text)'' || {{{ >>> b = Bug(123456) }}} <<BR>> {{{ >>> print [t.status for t in b.infotable] }}} || || ||
||<rowspan=2> '''change status of first task of #255634''' || ''py-lp-bugs (html)'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <<BR>> {{{ >>> b = Bug(255634) }}} <<BR>> {{{ >>> task = b.infotable[0] }}} <<BR>> {{{ >>> task.status = status_map[task.status] }}} <<BR>> {{{ >>> b.commit() }}} || <<BR>> || ||
||''launchpadlib'' || {{{ >>> status_map = {"New": "Invalid", "Invalid": "New"} }}} <<BR>> {{{ >>> b = launchpad.bugs[255634] }}} <<BR>> {{{ >>> task = list(b.bug_tasks)[0] }}} <<BR>> {{{ >>> task.transitionToStatus(status=status_map[task.status]) }}} || <<BR>> || ||

==== Conclusion ====
 * I'm not able to get time-stable results from staging, will try it later again

= Missing features in launchpadlib =

This is a list of which can be done with python-launchpad-bugs but not with launchpadlib. ''(still work in progress)''

|| '''Feature''' || '''LP Bug''' || '''Comment''' ||
|| getting a list of users bugs || Bug 281443 and Bug 282178 || ||
|| nominate a bug for a release || Bug 297458 || ||

time based comparison of python-launchpad-bugs and launchpadlib

This is still work in progress. python's timeit is used.

Preparation

launchpadlib

There are two files with credentials for STAGING and EDGE, for each mode the connector is created by

>>> credentials = Credentials()
>>> credentials.load(open(<file>))
>>> launchpad = Launchpad(credentials, <SERVER-const>)

python-launchpad-bugs (text)

(read-only access)

>>> Bug = ConnectBug("text")
>>> Bug.set_connection_mode(<SERVER-const>)

python-launchpad-bugs (html)

(this connection mode is used for write-access)

>>> Bug = ConnectBug("html")
>>> Bug.authentication = <cookie-file>
>>> Bug.set_connection_mode(<SERVER-const>)

Results

20080809

Versions

launchpadlib: lp:launchpadlib (rev8)

python-launchpad-bugs: lp:python-launchpad-bugs (rev152)

Results

Task

Lib

Code

STAGING

EDGE

get description of #123456

launchpadlib

 >>> b = launchpad.bugs[123456] 
 >>> print b.description 

10 loops, best of 3: 2.09 s per loop
25 loops, best of 3: 2.1 s per loop

10 loops, best of 3: 2.65 s per loop
25 loops, best of 3: 2.47 s per loop

py-lp-bugs (text)

 >>> b = Bug(123456) 
 >>> print b.description 

10 loops, best of 3: 638 ms per loop
25 loops, best of 3: 641 ms per loop

10 loops, best of 3: 808 ms per loop
25 loops, best of 3: 762 ms per loop

get status of all tasks of #123456

launchpadlib

 >>> b = launchpad.bugs[123456] 
 >>> print [t.status for t in b.bug_tasks] 

10 loops, best of 3: 2.23 s per loop
25 loops, best of 3: 2.28 s per loop

10 loops, best of 3: 2.86 s per loop
25 loops, best of 3: 2.69 s per loop

py-lp-bugs (text)

 >>> b = Bug(123456) 
 >>> print [t.status for t in b.infotable] 

10 loops, best of 3: 641 ms per loop
25 loops, best of 3: 639 ms per loop

10 loops, best of 3: 756 ms per loop
25 loops, best of 3: 751 ms per loop

change status of first task of #255634

py-lp-bugs (html)

 >>> status_map = {"New": "Invalid", "Invalid": "New"} 
 >>> b = Bug(255634) 
 >>> task = b.infotable[0] 
 >>> task.status = status_map[task.status] 
 >>> b.commit() 


10 loops, best of 3: 6.83 s per loop
25 loops, best of 3: 6.33 s per loop

launchpadlib

 >>> status_map = {"New": "Invalid", "Invalid": "New"} 
 >>> b = launchpad.bugs[255634] 
 >>> task = list(b.bug_tasks)[0] 
 >>> task.transitionToStatus(status=status_map[task.status]) 


10 loops, best of 3: 3.66 s per loop
25 loops, best of 3: 4.51 s per loop

Conclusion

  • for read-only access python-launchpad-bugs in the text mode is about three times faster than launchpadlib

  • write-access with launchpadlib is two times faster than python-launchpad-bugs in the html mode

20080821

Versions

launchpadlib: lp:launchpadlib (rev13)

wadllib: lp:wadllib (rev6)

python-launchpad-bugs: lp:python-launchpad-bugs (rev152)

Results

Task

Lib

Code

STAGING

EDGE

get description of #123456

launchpadlib

 >>> b = launchpad.bugs[123456] 
 >>> print b.description 

10 loops, best of 3: 189 ms per loop
25 loops, best of 3: 197 ms per loop

py-lp-bugs (text)

 >>> b = Bug(123456) 
 >>> print b.description 

get status of all tasks of #123456

launchpadlib

 >>> b = launchpad.bugs[123456] 
 >>> print [t.status for t in b.bug_tasks] 

py-lp-bugs (text)

 >>> b = Bug(123456) 
 >>> print [t.status for t in b.infotable] 

change status of first task of #255634

py-lp-bugs (html)

 >>> status_map = {"New": "Invalid", "Invalid": "New"} 
 >>> b = Bug(255634) 
 >>> task = b.infotable[0] 
 >>> task.status = status_map[task.status] 
 >>> b.commit() 


launchpadlib

 >>> status_map = {"New": "Invalid", "Invalid": "New"} 
 >>> b = launchpad.bugs[255634] 
 >>> task = list(b.bug_tasks)[0] 
 >>> task.transitionToStatus(status=status_map[task.status]) 


Conclusion

  • I'm not able to get time-stable results from staging, will try it later again

Missing features in launchpadlib

This is a list of which can be done with python-launchpad-bugs but not with launchpadlib. (still work in progress)

Feature

LP Bug

Comment

getting a list of users bugs

Bug 281443 and Bug 282178

nominate a bug for a release

Bug 297458

Comments/Notes

BugHelper/Dev/python-launchpad-bugs/Compare_lplib_pylpbugs (last edited 2009-01-23 19:30:32 by a89-182-194-225)