diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-05-27 07:38:20 +0300 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2019-06-05 15:58:46 +0300 |
commit | 40fd0b9e405ec8e4c37e8c90d44dde6c98e1176c (patch) | |
tree | 9ef6ad13bacc091965f42b411e5612a0aed16f90 /lib/gitlab/git/repository.rb | |
parent | b560ce1e666733f12c65e8b9f659c89256c1775b (diff) |
Add client code to call GetObjectDirectorySize RPC
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13460
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r-- | lib/gitlab/git/repository.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index dcdd3581d92..8a2e711ec4e 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -282,6 +282,11 @@ module Gitlab (size.to_f / 1024).round(2) end + # Return git object directory size in bytes + def object_directory_size + gitaly_repository_client.get_object_directory_size.to_f * 1024 + end + # Build an array of commits. # # Usage. |