Commit 1f9abe3b authored by Kerri Miller's avatar Kerri Miller

Define histogram for tracking blob size

parent 9afd7128
......@@ -35,6 +35,11 @@ module Gitlab
docstring 'blob.truncated? == false'
end
define_histogram :gitlab_blob_size do
docstring 'Gitlab::Git::Blob size'
buckets [1_000, 5_000, 10_000, 50_000, 100_000, 500_000, 1_000_000]
end
class << self
def find(repository, sha, path, limit: MAX_DATA_DISPLAY_SIZE)
tree_entry(repository, sha, path, limit)
......
......@@ -597,5 +597,9 @@ describe Gitlab::Git::Blob, :seed_helper do
it 'defines :gitlab_blob_truncated_false counter' do
expect(described_class).to respond_to(:gitlab_blob_truncated_false)
end
it 'defines :gitlab_blob_size histogram' do
expect(described_class).to respond_to(:gitlab_blob_size)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment