Bugfix/subscriber to feed data converter test speed #744

Merged
merged 1 commit into from May 27, 2013

Conversation

Projects
None yet
2 participants
@wilkie
Contributor

wilkie commented Feb 19, 2013

So. The SubscriberToFeedDataConverter tests won't run on their own. I had to add a bunch of dependencies. I don't really understand why the community shies away from requires in actual files where they depend on things.

Speed

Results related to #706.

Original

$ rake test:file[test/services/subscriber_to_feed_data_converter_test.rb]

6 tests, 1 assertions, 1 failures, 5 errors, 0 skips

Um. Alright. After requiring the dependencies

$ rake test:file[test/services/subscriber_to_feed_data_converter_test.rb]

Finished tests in 0.005167s, 1161.2156 tests/s, 2128.8953 assertions/s.

Well then! Fair enough.

User benchmark

$ time rake test:file[test/services/subscriber_to_feed_data_converter_test.rb]

Finished tests in 0.005005s, 1198.7727 tests/s, 2197.7499 assertions/s.

real    0m7.605s
user    0m7.277s
sys     0m0.303s

rake test:services

$ time rake test:services

Finished tests in 0.258596s, 65.7395 tests/s, 85.0747 assertions/s.

real    0m19.699s
user    0m18.983s
sys     0m0.667s

Overhead of 18-19 seconds.

rake test:services with #743

$ time rake test:services

Finished tests in 0.068574s, 247.9061 tests/s, 320.8196 assertions/s.

real    0m19.544s
user    0m18.800s
sys     0m0.693s

No discernible improvement upon the overhead, which constitutes 28500% of the total user time.

However, this overhead seems to be per file! The file alone was only 7s.

Fixes the tests so that they can execute on their own.
Speed benchmarks:

```
$ rake
test:file[test/services/subscriber_to_feed_data_converter_test.rb]

6 tests, 1 assertions, 1 failures, 5 errors, 0 skips
```

```
$ rake
test:file[test/services/subscriber_to_feed_data_converter_test.rb]

Finished tests in 0.005167s, 1161.2156 tests/s, 2128.8953 assertions/s.

```

Fair enough.

@carols10cents carols10cents merged commit 5752849 into hotsh:master May 27, 2013

1 check passed

default The Travis build passed
Details
@carols10cents

This comment has been minimized.

Show comment Hide comment
@carols10cents

carols10cents May 27, 2013

Contributor

👍 sorry for not merging forever!

Contributor

carols10cents commented May 27, 2013

👍 sorry for not merging forever!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment