memory 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/memory/profiler.rb +2 -2
- data/lib/memory/aggregate.rb +6 -6
- data/lib/memory/report.rb +5 -5
- data/lib/memory/version.rb +1 -1
- data/license.md +1 -1
- data/readme.md +8 -0
- data.tar.gz.sig +3 -1
- metadata +5 -61
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2400492846a2a2ac811dbdd279b3c1aa02446e6c2dfd45684e7c517d45ab3139
|
4
|
+
data.tar.gz: 649b747e821996d0aca2cb92782661916fb05b8c76418a8e95acef988f97909a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34682359d1d6b6e04af1582fb9a3a43c798ca032a02fd79fe9f1f62ee00d4c717639867e41f53e998bfc2749afe9423e2a87865451b58de3e63cf033e40c2710
|
7
|
+
data.tar.gz: e5f1bbcf26cb1aae51c03d2fd465c38682ee35f8d9098af225791802ba5f9c34238d8b86993e10628b047da71c50336826ddf0f2beb1a0a204ffb244887894e0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bake/memory/profiler.rb
CHANGED
@@ -18,7 +18,7 @@ def check(paths:)
|
|
18
18
|
cache = Memory::Cache.new
|
19
19
|
wrapper = Memory::Wrapper.new(cache)
|
20
20
|
|
21
|
-
|
21
|
+
progress = Console.logger.progress(report, total_size)
|
22
22
|
|
23
23
|
paths.each do |path|
|
24
24
|
Console.logger.info(report, "Loading #{path}, #{Memory.formatted_bytes File.size(path)}")
|
@@ -29,7 +29,7 @@ def check(paths:)
|
|
29
29
|
|
30
30
|
report.concat(unpacker)
|
31
31
|
|
32
|
-
|
32
|
+
progress.increment(io.size)
|
33
33
|
end
|
34
34
|
|
35
35
|
Console.logger.info(report, "Loaded allocations, #{report.total_allocated}")
|
data/lib/memory/aggregate.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2023, by Samuel Williams.
|
5
5
|
|
6
6
|
module Memory
|
7
7
|
UNITS = {
|
@@ -43,7 +43,7 @@ module Memory
|
|
43
43
|
"(#{Memory.formatted_bytes memory} in #{count} allocations)"
|
44
44
|
end
|
45
45
|
|
46
|
-
def as_json
|
46
|
+
def as_json(options = nil)
|
47
47
|
{
|
48
48
|
memory: memory,
|
49
49
|
count: count
|
@@ -89,11 +89,11 @@ module Memory
|
|
89
89
|
io.puts nil
|
90
90
|
end
|
91
91
|
|
92
|
-
def as_json
|
92
|
+
def as_json(options = nil)
|
93
93
|
{
|
94
94
|
title: @title,
|
95
|
-
total: @total.as_json,
|
96
|
-
totals: @totals.map{|k, v| [k, v.as_json]}
|
95
|
+
total: @total.as_json(options),
|
96
|
+
totals: @totals.map{|k, v| [k, v.as_json(options)]}
|
97
97
|
}
|
98
98
|
end
|
99
99
|
end
|
@@ -130,7 +130,7 @@ module Memory
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
-
def as_json
|
133
|
+
def as_json(options = nil)
|
134
134
|
{
|
135
135
|
title: @title,
|
136
136
|
aggregates: @aggregates.map{|k, v| [k, v.as_json]}
|
data/lib/memory/report.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2023, by Samuel Williams.
|
5
5
|
|
6
6
|
require_relative 'aggregate'
|
7
7
|
|
@@ -58,11 +58,11 @@ module Memory
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
def as_json
|
61
|
+
def as_json(options = nil)
|
62
62
|
{
|
63
|
-
total_allocated: @total_allocated.as_json,
|
64
|
-
total_retained: @total_retained.as_json,
|
65
|
-
aggregates: @aggregates.map(
|
63
|
+
total_allocated: @total_allocated.as_json(options),
|
64
|
+
total_retained: @total_retained.as_json(options),
|
65
|
+
aggregates: @aggregates.map{|aggregate| aggregate.as_json(options)}
|
66
66
|
}
|
67
67
|
end
|
68
68
|
|
data/lib/memory/version.rb
CHANGED
data/license.md
CHANGED
@@ -24,7 +24,7 @@ Copyright, 2019-2020, by Jean Boussier.
|
|
24
24
|
Copyright, 2019, by Ashwin Maroli.
|
25
25
|
Copyright, 2019, by Olle Jonsson.
|
26
26
|
Copyright, 2019, by Danny Ben Shitrit.
|
27
|
-
Copyright, 2020-
|
27
|
+
Copyright, 2020-2023, by Samuel Williams.
|
28
28
|
|
29
29
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
30
30
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
@@ -121,3 +121,11 @@ We welcome contributions to this project.
|
|
121
121
|
3. Commit your changes (`git commit -am 'Add some feature'`).
|
122
122
|
4. Push to the branch (`git push origin my-new-feature`).
|
123
123
|
5. Create new Pull Request.
|
124
|
+
|
125
|
+
### Developer Certificate of Origin
|
126
|
+
|
127
|
+
This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
|
128
|
+
|
129
|
+
### Contributor Covenant
|
130
|
+
|
131
|
+
This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
data.tar.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
c ���P�ٮ���[/~�\���(K�l��Y���&�(i�H���<���=��
|
2
|
+
$�� JH/pb&��8J�kI�A�o��[�+M1�������w�������}�z��Sk�WY�RѪH�s�cv�L[�+�6�ď�p�=ge�RkɆgD��w!���/���`�2�C����L��d�d�9���m�?��`.��2�#|����hA�-E��zFGR���DАYPS��o�dX.���y��$�qMڨ>cr�:_PxaƉ ��J�}p}p������kݬL�{�̧$�-�n{~>0�p"p��?�� ���>v��&1�b�\�̋<+3Dd�3Ӵۉ�
|
3
|
+
?N���f��1�[]zL9��0|.9h�=��ȫ:�,b
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
- Dave Gynn
|
9
|
+
- Samuel Williams
|
9
10
|
- Nick LaMuro
|
10
11
|
- Jonas Peschla
|
11
|
-
- Samuel Williams
|
12
12
|
- Ashwin Maroli
|
13
13
|
- Søren Skovsbøll
|
14
14
|
- Richard Schneeman
|
@@ -61,7 +61,7 @@ cert_chain:
|
|
61
61
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
62
62
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
63
63
|
-----END CERTIFICATE-----
|
64
|
-
date:
|
64
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
65
65
|
dependencies:
|
66
66
|
- !ruby/object:Gem::Dependency
|
67
67
|
name: bake
|
@@ -105,62 +105,6 @@ dependencies:
|
|
105
105
|
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
|
-
- !ruby/object:Gem::Dependency
|
109
|
-
name: bake-test
|
110
|
-
requirement: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: '0'
|
115
|
-
type: :development
|
116
|
-
prerelease: false
|
117
|
-
version_requirements: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '0'
|
122
|
-
- !ruby/object:Gem::Dependency
|
123
|
-
name: bundler
|
124
|
-
requirement: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - ">="
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0'
|
129
|
-
type: :development
|
130
|
-
prerelease: false
|
131
|
-
version_requirements: !ruby/object:Gem::Requirement
|
132
|
-
requirements:
|
133
|
-
- - ">="
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: '0'
|
136
|
-
- !ruby/object:Gem::Dependency
|
137
|
-
name: covered
|
138
|
-
requirement: !ruby/object:Gem::Requirement
|
139
|
-
requirements:
|
140
|
-
- - ">="
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
143
|
-
type: :development
|
144
|
-
prerelease: false
|
145
|
-
version_requirements: !ruby/object:Gem::Requirement
|
146
|
-
requirements:
|
147
|
-
- - ">="
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
version: '0'
|
150
|
-
- !ruby/object:Gem::Dependency
|
151
|
-
name: sus
|
152
|
-
requirement: !ruby/object:Gem::Requirement
|
153
|
-
requirements:
|
154
|
-
- - ">="
|
155
|
-
- !ruby/object:Gem::Version
|
156
|
-
version: '0'
|
157
|
-
type: :development
|
158
|
-
prerelease: false
|
159
|
-
version_requirements: !ruby/object:Gem::Requirement
|
160
|
-
requirements:
|
161
|
-
- - ">="
|
162
|
-
- !ruby/object:Gem::Version
|
163
|
-
version: '0'
|
164
108
|
description:
|
165
109
|
email:
|
166
110
|
executables: []
|
@@ -190,14 +134,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
134
|
requirements:
|
191
135
|
- - ">="
|
192
136
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
137
|
+
version: '3.0'
|
194
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
139
|
requirements:
|
196
140
|
- - ">="
|
197
141
|
- !ruby/object:Gem::Version
|
198
142
|
version: '0'
|
199
143
|
requirements: []
|
200
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.4.10
|
201
145
|
signing_key:
|
202
146
|
specification_version: 4
|
203
147
|
summary: Memory profiling routines for Ruby 2.3+
|
metadata.gz.sig
CHANGED
Binary file
|