profile_require 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/profile_require.rb +16 -0
- metadata +50 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Kernel
|
|
2
|
+
if ENV["PROFILE_REQUIRE"]
|
|
3
|
+
unless defined?(profile_require)
|
|
4
|
+
alias profile_require require
|
|
5
|
+
|
|
6
|
+
def require path
|
|
7
|
+
STDERR.puts "require #{path} started"
|
|
8
|
+
time_before_require = Time.now
|
|
9
|
+
profile_require path
|
|
10
|
+
ensure
|
|
11
|
+
STDERR.puts "require #{path}: #{Time.now-time_before_require} seconds"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
metadata
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: profile_require
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.2
|
|
5
|
+
prerelease:
|
|
6
|
+
platform: ruby
|
|
7
|
+
authors:
|
|
8
|
+
- Johannes Thoma
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2012-02-08 00:00:00.000000000Z
|
|
13
|
+
dependencies: []
|
|
14
|
+
description: ! 'Simple profiling time elapsed in requires
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
This is very useful in large projects. Currently only prints time
|
|
18
|
+
|
|
19
|
+
elapsed for require to STDERR, since this is what I need.'
|
|
20
|
+
email: johannes.thoma@gmx.at
|
|
21
|
+
executables: []
|
|
22
|
+
extensions: []
|
|
23
|
+
extra_rdoc_files: []
|
|
24
|
+
files:
|
|
25
|
+
- lib/profile_require.rb
|
|
26
|
+
homepage: http://rubygems.org/gems/profile-require
|
|
27
|
+
licenses: []
|
|
28
|
+
post_install_message:
|
|
29
|
+
rdoc_options: []
|
|
30
|
+
require_paths:
|
|
31
|
+
- lib
|
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
33
|
+
none: false
|
|
34
|
+
requirements:
|
|
35
|
+
- - ! '>='
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
|
+
none: false
|
|
40
|
+
requirements:
|
|
41
|
+
- - ! '>='
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: '0'
|
|
44
|
+
requirements: []
|
|
45
|
+
rubyforge_project:
|
|
46
|
+
rubygems_version: 1.8.10
|
|
47
|
+
signing_key:
|
|
48
|
+
specification_version: 3
|
|
49
|
+
summary: Simple profiling time elapsed in requires
|
|
50
|
+
test_files: []
|