Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1f9abe3b
Commit
1f9abe3b
authored
Feb 18, 2020
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define histogram for tracking blob size
parent
9afd7128
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
lib/gitlab/git/blob.rb
lib/gitlab/git/blob.rb
+5
-0
spec/lib/gitlab/git/blob_spec.rb
spec/lib/gitlab/git/blob_spec.rb
+4
-0
No files found.
lib/gitlab/git/blob.rb
View file @
1f9abe3b
...
...
@@ -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
)
...
...
spec/lib/gitlab/git/blob_spec.rb
View file @
1f9abe3b
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment