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
6652f28f
Commit
6652f28f
authored
Jan 31, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update multi file editor logic
parent
2f3923c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
ee/lib/gitlab/metrics/multi_file_editor.rb
ee/lib/gitlab/metrics/multi_file_editor.rb
+10
-11
No files found.
ee/lib/gitlab/metrics/multi_file_editor.rb
View file @
6652f28f
...
...
@@ -3,8 +3,6 @@ module Gitlab
class
MultiFileEditor
delegate
:total
,
to: :commit_stats
,
prefix: :line_changes
METRIC_NAME
=
:multi_file_editor_usage
def
initialize
(
project
,
current_user
,
commit
)
@project
,
@current_user
,
@commit
=
project
,
current_user
,
commit
end
...
...
@@ -12,10 +10,11 @@ module Gitlab
def
record
return
unless
::
License
.
feature_available?
(
:ide
)
::
Gitlab
::
Metrics
.
counter
(
METRIC_NAME
,
'Total number of commits using the multi-file web editor'
,
metric_labels
)
metric
=
WebIdeMetric
.
new
(
metric_data
)
unless
metric
.
save
Rails
.
logger
.
error
(
"Error persisting Web IDE metric:
#{
metric
.
as_json
}
-
#{
metric
.
errors
.
full_messages
}
"
)
end
end
private
...
...
@@ -36,12 +35,12 @@ module Gitlab
@commit
.
stats
end
def
metric_
labels
def
metric_
data
{
project:
hashed_project
,
user:
hashed_user
,
line_changes
:
line_changes_total
,
files
_count:
files_total
project:
hashed_project
,
user:
hashed_user
,
line_count
:
line_changes_total
,
file
_count:
files_total
}
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