gitlab-exporter 9.0.0 → 9.1.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gitlab_exporter/version.rb +1 -1
- data/lib/gitlab_exporter/web_exporter.rb +19 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04f135f6746fff19e960b1ec4c46226541cf5522b36d8f12618bdd1a8dad2998
|
4
|
+
data.tar.gz: 3dfb6dd9751dab33bd5eba3994f380d22dd1a25cc00a4d5b8071aa97e4e5d894
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58fde6e70e4f5f1c10ec821866390867317a3d337aacb51ced2a8f0ab28b01c614909fa6abdec7063b73f4b9a23f6da49928a876a161baf715e165dc30607b2a
|
7
|
+
data.tar.gz: 8f420a0fb33a6d109a0645bcd1d178d13a57e8d049c52c65e168eaeeeb680a42e491df01e8a4f92fc6460f3f3272638af91a4a25f04cd86e4e24a899da300d2a
|
data/Gemfile.lock
CHANGED
@@ -35,6 +35,21 @@ module GitLab
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
# Performs a major GC after each request. We found that this helps to free up
|
39
|
+
# several MB of memory in conjunction with sricter malloc config.
|
40
|
+
# See https://gitlab.com/gitlab-org/gitlab/-/issues/297241
|
41
|
+
class RunGC
|
42
|
+
def initialize(app)
|
43
|
+
@app = app
|
44
|
+
end
|
45
|
+
|
46
|
+
def call(env)
|
47
|
+
@app.call(env).tap do
|
48
|
+
GC.start
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
38
53
|
class << self
|
39
54
|
DEFAULT_WEB_SERVER = "webrick".freeze
|
40
55
|
|
@@ -45,6 +60,10 @@ module GitLab
|
|
45
60
|
memory_threshold = (config[:server] && config[:server][:memory_threshold]) || 1024
|
46
61
|
use MemoryKillerMiddleware, memory_threshold
|
47
62
|
use Rack::Logger
|
63
|
+
use RunGC
|
64
|
+
|
65
|
+
# Defrag heap after everything is loaded into memory.
|
66
|
+
GC.compact
|
48
67
|
end
|
49
68
|
|
50
69
|
def logger
|