gems test-prof 0.6.0
0.6.0 "Crusty Baguette" 🇫🇷🥖

latest releases: 1.3.3, 1.3.2, 1.3.1...
5 years ago

Paris.rb 2018 special.

Features

  • Add EventProf.monitor to instrument arbitrary methods 📝 Docs

Add custom instrumetation easily:

class Work
  def do
    # ...
  end
end

# Instrument Work#do calls with "my.work" event
TestProf::EventProf.monitor(Work, "my.work", :do)

Now it's possible to write your own adapter for before_all to manage
transactions.

Fixes & Improvements

  • Show top let declarations per example group in RSpecDissect profiler.

The output now includes the following information:

Top 5 slowest suites (by `let` time):

FunnelsController (./spec/controllers/funnels_controller_spec.rb:3) – 00:38.532 of 00:43.649 (133)
 ↳ user – 3
 ↳ funnel – 2
ApplicantsController (./spec/controllers/applicants_controller_spec.rb:3) – 00:33.252 of 00:41.407 (222)
 ↳ user – 10
 ↳ funnel – 5

Enabled by default. Disable it with:

TestProf::RSpecDissect.configure do |config|
  config.let_stats_enabled = false
end
  • Added ability to preserve traits in FactoryDefault. 📝 Docs

Disabled by default for compatibility.

Enable globally by FactoryDefault.preserve_traits = true or for a single create_default: create_default(:user, preserve_traits: true)

When enabled the default object is only used when there's no traits in the association.

  • Add ability to run only let or before profiler with RSpecDissect.

  • Collect raw data with StackProf by default.

  • Refactor :with_clean_fixture to clean data once per group.

  • Fix RSpec/Aggregate failures with non-regular examples.

Do not take into account xit, pending, its, etc. examples,
only consider regular it, specify, scenario, example.

Don't miss a new test-prof release

NewReleases is sending notifications on new releases.