mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 02:41:41 +00:00
test de performance
This commit is contained in:
parent
eca6c14431
commit
7a518ee8a9
1 changed files with 21 additions and 0 deletions
21
test/system/site_test.rb
Normal file
21
test/system/site_test.rb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class SiteTest < ActiveSupport::TestCase
|
||||||
|
def site
|
||||||
|
@site ||= Site.new name: 'recursero', design_id: Design.find_by_gem('recursero-jekyll-theme').id
|
||||||
|
end
|
||||||
|
|
||||||
|
test 'tiene una performance' do
|
||||||
|
skip unless ENV['TEST_PERFORMANCE'].present?
|
||||||
|
|
||||||
|
site.read
|
||||||
|
|
||||||
|
profile = StackProf.run mode: :object do
|
||||||
|
site.posts
|
||||||
|
end
|
||||||
|
|
||||||
|
StackProf::Report.new(profile).print_text
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue