summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-10-10 14:21:28 +0200
committerPaco Guzman <pacoguzmanp@gmail.com>2016-10-11 15:36:05 +0200
commita4c8927007499d71a13e1a52c59a0ec36f20a6e0 (patch)
tree20b71dd0d8e0c19701cb6ad9a270ce1a0f0e18fc /bin
parentb30d957fe2a85ee9ebb058010020e1c21d256a44 (diff)
downloadgitlab-shell-a4c8927007499d71a13e1a52c59a0ec36f20a6e0.tar.gz
Instrument GitLab Shell and log metrics data to a file
Diffstat (limited to 'bin')
-rwxr-xr-xbin/create-hooks5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/create-hooks b/bin/create-hooks
index 241e10b..d948d87 100755
--- a/bin/create-hooks
+++ b/bin/create-hooks
@@ -6,13 +6,16 @@
require_relative '../lib/gitlab_init'
require File.join(ROOT_PATH, 'lib', 'gitlab_projects')
+require File.join(ROOT_PATH, 'lib', 'gitlab_metrics')
repository_storage_paths = ARGV
repository_storage_paths.each do |repo_path|
Dir["#{repo_path.chomp('/')}/*/*.git"].each do |repo|
begin
- GitlabProjects.create_hooks(repo)
+ GitlabMetrics.measure('command-create-hooks') do
+ GitlabProjects.create_hooks(repo)
+ end
rescue Errno::ENOENT
# The user must have deleted their repository. Ignore.
end