diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-10-10 14:21:28 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-10-11 13:15:28 +0200 |
commit | ba44420a2184476fb4c76b3b797b5d1e3e714c8a (patch) | |
tree | 9af1b29e5a14497e7c632880c8a04efe08655f24 /bin/create-hooks | |
parent | b30d957fe2a85ee9ebb058010020e1c21d256a44 (diff) | |
download | gitlab-shell-62-instrument-gitlab-shell.tar.gz |
Instrument GitLab Shell and log metrics data to a file62-instrument-gitlab-shell
Diffstat (limited to 'bin/create-hooks')
-rwxr-xr-x | bin/create-hooks | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/create-hooks b/bin/create-hooks index 241e10b..49f43cf 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 |