debian-mirror-gitlab/lib/gitlab/memory/reports/jemalloc_stats.rb
2023-03-04 22:38:38 +05:30

23 lines
410 B
Ruby

# frozen_string_literal: true
module Gitlab
module Memory
module Reports
class JemallocStats
def name
'jemalloc_stats'
end
def run(writer)
return unless active?
Gitlab::Memory::Jemalloc.dump_stats(writer)
end
def active?
Feature.enabled?(:report_jemalloc_stats, type: :ops)
end
end
end
end
end