heap-profiler 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/tests.yml +59 -0
- data/.gitignore +11 -0
- data/.rubocop.yml +20 -0
- data/.travis.yml +6 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +51 -0
- data/LICENSE.txt +21 -0
- data/README.md +269 -0
- data/Rakefile +17 -0
- data/TODO.md +9 -0
- data/benchmark/address-parsing.rb +12 -0
- data/benchmark/indexing.rb +14 -0
- data/bin/console +15 -0
- data/bin/generate-report +34 -0
- data/bin/rubocop +29 -0
- data/bin/setup +8 -0
- data/bin/testunit +9 -0
- data/dev.yml +20 -0
- data/exe/heap-profiler +6 -0
- data/ext/heap_profiler/extconf.rb +7 -0
- data/ext/heap_profiler/heap_profiler.cpp +262 -0
- data/ext/heap_profiler/simdjson.cpp +17654 -0
- data/ext/heap_profiler/simdjson.h +7716 -0
- data/heap-profiler.gemspec +31 -0
- data/lib/heap-profiler.rb +6 -0
- data/lib/heap_profiler/analyzer.rb +147 -0
- data/lib/heap_profiler/cli.rb +32 -0
- data/lib/heap_profiler/diff.rb +35 -0
- data/lib/heap_profiler/dump.rb +101 -0
- data/lib/heap_profiler/full.rb +12 -0
- data/lib/heap_profiler/index.rb +89 -0
- data/lib/heap_profiler/monochrome.rb +19 -0
- data/lib/heap_profiler/native.rb +48 -0
- data/lib/heap_profiler/polychrome.rb +93 -0
- data/lib/heap_profiler/reporter.rb +107 -0
- data/lib/heap_profiler/results.rb +212 -0
- data/lib/heap_profiler/runtime.rb +29 -0
- data/lib/heap_profiler/version.rb +6 -0
- metadata +86 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "objspace"
|
4
|
+
require "fileutils"
|
5
|
+
|
6
|
+
require "heap_profiler/version"
|
7
|
+
require "heap_profiler/reporter"
|
8
|
+
|
9
|
+
module HeapProfiler
|
10
|
+
Error = Class.new(StandardError)
|
11
|
+
|
12
|
+
class << self
|
13
|
+
attr_accessor :current_reporter
|
14
|
+
|
15
|
+
def start(dir)
|
16
|
+
return if current_reporter
|
17
|
+
self.current_reporter = Reporter.new(dir)
|
18
|
+
current_reporter.start
|
19
|
+
end
|
20
|
+
|
21
|
+
def stop
|
22
|
+
current_reporter&.stop
|
23
|
+
end
|
24
|
+
|
25
|
+
def report(dir, &block)
|
26
|
+
Reporter.new(dir).run(&block)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: heap-profiler
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jean Boussier
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-08-03 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Make several heap dumps and summarize allocated, retained memory
|
14
|
+
email:
|
15
|
+
- jean.boussier@gmail.com
|
16
|
+
executables:
|
17
|
+
- heap-profiler
|
18
|
+
extensions:
|
19
|
+
- ext/heap_profiler/extconf.rb
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- ".github/workflows/tests.yml"
|
23
|
+
- ".gitignore"
|
24
|
+
- ".rubocop.yml"
|
25
|
+
- ".travis.yml"
|
26
|
+
- Gemfile
|
27
|
+
- Gemfile.lock
|
28
|
+
- LICENSE.txt
|
29
|
+
- README.md
|
30
|
+
- Rakefile
|
31
|
+
- TODO.md
|
32
|
+
- benchmark/address-parsing.rb
|
33
|
+
- benchmark/indexing.rb
|
34
|
+
- bin/console
|
35
|
+
- bin/generate-report
|
36
|
+
- bin/rubocop
|
37
|
+
- bin/setup
|
38
|
+
- bin/testunit
|
39
|
+
- dev.yml
|
40
|
+
- exe/heap-profiler
|
41
|
+
- ext/heap_profiler/extconf.rb
|
42
|
+
- ext/heap_profiler/heap_profiler.cpp
|
43
|
+
- ext/heap_profiler/simdjson.cpp
|
44
|
+
- ext/heap_profiler/simdjson.h
|
45
|
+
- heap-profiler.gemspec
|
46
|
+
- lib/heap-profiler.rb
|
47
|
+
- lib/heap_profiler/analyzer.rb
|
48
|
+
- lib/heap_profiler/cli.rb
|
49
|
+
- lib/heap_profiler/diff.rb
|
50
|
+
- lib/heap_profiler/dump.rb
|
51
|
+
- lib/heap_profiler/full.rb
|
52
|
+
- lib/heap_profiler/index.rb
|
53
|
+
- lib/heap_profiler/monochrome.rb
|
54
|
+
- lib/heap_profiler/native.rb
|
55
|
+
- lib/heap_profiler/polychrome.rb
|
56
|
+
- lib/heap_profiler/reporter.rb
|
57
|
+
- lib/heap_profiler/results.rb
|
58
|
+
- lib/heap_profiler/runtime.rb
|
59
|
+
- lib/heap_profiler/version.rb
|
60
|
+
homepage: https://github.com/Shopify/heap-profiler
|
61
|
+
licenses:
|
62
|
+
- MIT
|
63
|
+
metadata:
|
64
|
+
allowed_push_host: https://rubygems.org/
|
65
|
+
homepage_uri: https://github.com/Shopify/heap-profiler
|
66
|
+
source_code_uri: https://github.com/Shopify/heap-profiler
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.6.0
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubygems_version: 3.0.3
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: Ruby heap profiling tool
|
86
|
+
test_files: []
|