Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2019-06-20 14:04:56 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2019-06-20 16:26:56 +0300
commit44528f6c444ae55008866d2861f1d160486b37d1 (patch)
tree014053b528e80d078096dc620fcbbb012ef522d9 /lib/gitaly
parent4298a28a993363f4ab6b63c14820492393a3ae94 (diff)
Add Gitaly data to the usage ping
Gitaly data wasn't available to the team, an this change is a first iteration towards understanding what data we need and how to interpret it. Later more values will be added. For now the most important thing is the filesystem String Array, as that includes data on ext4 exposure and NFS. Part of: https://gitlab.com/gitlab-org/gitlab-ce/issues/60602
Diffstat (limited to 'lib/gitaly')
-rw-r--r--lib/gitaly/server.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/gitaly/server.rb b/lib/gitaly/server.rb
index 7b238623418..907c6e1b605 100644
--- a/lib/gitaly/server.rb
+++ b/lib/gitaly/server.rb
@@ -2,8 +2,18 @@
module Gitaly
class Server
- def self.all
- Gitlab.config.repositories.storages.keys.map { |s| Gitaly::Server.new(s) }
+ class << self
+ def all
+ Gitlab.config.repositories.storages.keys.map { |s| Gitaly::Server.new(s) }
+ end
+
+ def count
+ all.size
+ end
+
+ def filesystems
+ all.map(&:filesystem_type).compact.uniq
+ end
end
attr_reader :storage
@@ -36,6 +46,10 @@ module Gitaly
storage_status&.writeable
end
+ def filesystem_type
+ storage_status&.fs_type
+ end
+
def address
Gitlab::GitalyClient.address(@storage)
rescue RuntimeError => e