Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test to measure performance of fetch in big interval tree. #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vrublev
Copy link

@vrublev vrublev commented Jul 19, 2018

Noticed that latest version of Set::IntervalTree is significantly slower. Up to now was using 0.11 and was more than happy with its functionality and performance 👍
In order to illustrate the latest problems I am observing added test to measure performance of fetch in big interval tree.

When the above test is run on my PC with Intel Core i7 on latest version the result of the test for elapsed time result is about 15-18seconds

$ git co master
$ dzil test
...
t/author-pod-syntax.t .. ok
t/fetch-nearest.t ...... ok
t/fetch_big.t .......... 2/2
#   Failed test 'We should do 10,000 fetches in less than a second'
#   at t/fetch_big.t line 41.
#     '10.0522201061249'
#         <=
#     '1'
# Looks like you failed 1 test of 2.
t/fetch_big.t .......... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
t/fetch_window.t ....... ok
t/Set-IntervalTree.t ... ok
Test Summary Report
-------------------
t/fetch_big.t        (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=5, Tests=17, 10 wallclock secs ( 0.02 usr  0.01 sys + 10.19 cusr  0.07 csys = 10.29 CPU)
Result: FAIL
Failed 1/5 test programs. 1/17 subtests failed.
make: *** [Makefile:1018: test_dynamic] Error 255
error running make test

When I checkout manually e2f149c the result is usually about 10ms.

$ perl fetch_big.t
1..2
ok 1 - use Set::IntervalTree;
Time elapsed was 0.00767803192138672
ok 2 - We should do 10,000 fetches in less than a second

As far as I could see the problem appeared in 909461a, but since it is a fix plus refactor and my C++ skills are very very basic, I figured you will be much faster and efficient at spotting and fixing the issue.

Added test to measure performance of fetch in big interval tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant