Does SummaNotification#duration within rspec-core measure time taken to make DB calls?

7 views
Skip to first unread message

ad...@mrageh.com

unread,
Jan 3, 2016, 8:45:57 AM1/3/16
to rspec
Hey Folks


`SummaryNotification#duration` measures the time taken to run the test suite, does this time that is returned include how long it took a test suite to set objects up, make db calls etc?

Thanks Adam

Myron Marston

unread,
Jan 3, 2016, 2:34:04 PM1/3/16
to rs...@googlegroups.com

Yes. RSpec simply measures the time between just before the first spec runs until just after the last spec finishes. It does not attempt to distinguish between different activities that take up that time, such as setting objects up and making DB calls.

Note that we do measure load time separately, however. SummaryNotification#load_time measures the time from when RSpec begins to get loaded until the spec files have all been loaded. Importantly, this does not include the boot time of Ruby itself or anything that loads or executes before RSpec (such as rake or bundler).

Myron


--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/7eb116bb-4e4b-4017-802b-07df26729a4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages