[asterisk-dev] [Code Review] testsuite: speed up __make_directory_structure by caching processed dirs
Mark Michelson
reviewboard at asterisk.org
Thu Mar 21 14:21:32 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2396/#review8121
-----------------------------------------------------------
Ship it!
- Mark
On March 18, 2013, 5:04 a.m., wdoekes wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2396/
> -----------------------------------------------------------
>
> (Updated March 18, 2013, 5:04 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> The testsuite symlinks all files from asterisk.conf [directories] into its /tmp/* path for every test.
>
> It does a os.walk() and os.path.exists() of /var/lib/asterisk contents 4 times by default, instead of only once. That's a bit unnecessary.
>
> I added a dir-cache set() to keep track of copied base directories. Expect a negligible speed increase per test.
>
>
> Diffs
> -----
>
> /asterisk/trunk/lib/python/asterisk/asterisk.py 3668
>
> Diff: https://reviewboard.asterisk.org/r/2396/diff
>
>
> Testing
> -------
>
> I tested 57 SIP tests on a lightly loaded system. They ran 300ms faster on average, 230ms median.
>
>
> Thanks,
>
> wdoekes
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130321/dfa04306/attachment.htm>
More information about the asterisk-dev
mailing list