hotsh/rstat.us — pull request #744 by wilkie (2013-02-19 11:09:47+00:00)
Title: Bugfix/subscriber to feed data converter test speed

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.