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
8d5b82ec
Commit
8d5b82ec
authored
Sep 16, 2020
by
Gary Holtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebasing with a fresh master copy and adding changelog
parent
99a7757c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
7 deletions
+21
-7
ee/changelogs/unreleased/224593-update-usage-ping-data-to-track-file-locking-data-2.yml
...3-update-usage-ping-data-to-track-file-locking-data-2.yml
+5
-0
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+3
-1
ee/spec/lib/ee/gitlab/usage_data_spec.rb
ee/spec/lib/ee/gitlab/usage_data_spec.rb
+13
-6
No files found.
ee/changelogs/unreleased/224593-update-usage-ping-data-to-track-file-locking-data-2.yml
0 → 100644
View file @
8d5b82ec
---
title
:
Adding total counts of default branch locks and multi-branch LFS locks
merge_request
:
41824
author
:
type
:
added
ee/lib/ee/gitlab/usage_data.rb
View file @
8d5b82ec
...
...
@@ -242,7 +242,9 @@ module EE
start:
user_minimum_id
,
finish:
user_maximum_id
),
users_using_path_locks:
distinct_count
(
PathLock
.
where
(
time_period
),
:user_id
),
users_using_lfs_locks:
distinct_count
(
LfsFileLock
.
where
(
time_period
),
:user_id
)
users_using_lfs_locks:
distinct_count
(
LfsFileLock
.
where
(
time_period
),
:user_id
),
total_number_of_path_locks:
count
(
::
PathLock
.
where
(
time_period
)),
total_number_of_locked_files:
count
(
::
LfsFileLock
.
where
(
time_period
))
},
approval_rules_counts
)
end
...
...
ee/spec/lib/ee/gitlab/usage_data_spec.rb
View file @
8d5b82ec
...
...
@@ -310,6 +310,9 @@ RSpec.describe Gitlab::UsageData do
create
(
:path_lock
,
user:
user
,
project:
project
,
path:
'4.txt'
)
create
(
:path_lock
,
user:
user
,
project:
project
,
path:
'5.txt'
)
create
(
:path_lock
,
user:
user
,
project:
project
,
path:
'6.txt'
)
create_list
(
:lfs_file_lock
,
3
)
create_list
(
:path_lock
,
4
)
end
expect
(
described_class
.
usage_activity_by_stage_create
({})).
to
include
(
...
...
@@ -321,11 +324,13 @@ RSpec.describe Gitlab::UsageData do
merge_requests_with_optional_codeowners:
4
,
merge_requests_with_required_codeowners:
8
,
projects_imported_from_github:
2
,
projects_with_repositories_enabled:
12
,
projects_with_repositories_enabled:
26
,
protected_branches:
2
,
suggestions:
2
,
users_using_lfs_locks:
6
,
users_using_path_locks:
8
users_using_lfs_locks:
12
,
users_using_path_locks:
16
,
total_number_of_path_locks:
20
,
total_number_of_locked_files:
14
)
expect
(
described_class
.
usage_activity_by_stage_create
(
described_class
.
last_28_days_time_period
)).
to
include
(
approval_project_rules:
6
,
...
...
@@ -336,11 +341,13 @@ RSpec.describe Gitlab::UsageData do
merge_requests_with_optional_codeowners:
2
,
merge_requests_with_required_codeowners:
4
,
projects_imported_from_github:
1
,
projects_with_repositories_enabled:
6
,
projects_with_repositories_enabled:
13
,
protected_branches:
1
,
suggestions:
1
,
users_using_lfs_locks:
3
,
users_using_path_locks:
4
users_using_lfs_locks:
6
,
users_using_path_locks:
8
,
total_number_of_path_locks:
10
,
total_number_of_locked_files:
7
)
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