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
e9ebc108
Commit
e9ebc108
authored
Jul 23, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
3a39ae32
6ee5f089
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
5 deletions
+36
-5
app/models/issue.rb
app/models/issue.rb
+1
-1
changelogs/unreleased/64974-remove-livesum-from-ruby-sampler-metrics.yml
...leased/64974-remove-livesum-from-ruby-sampler-metrics.yml
+5
-0
changelogs/unreleased/bw-add-index-for-relative-position.yml
changelogs/unreleased/bw-add-index-for-relative-position.yml
+5
-0
db/migrate/20190709220143_add_index_to_issues_relative_position.rb
...e/20190709220143_add_index_to_issues_relative_position.rb
+20
-0
db/schema.rb
db/schema.rb
+1
-0
lib/gitlab/metrics/samplers/ruby_sampler.rb
lib/gitlab/metrics/samplers/ruby_sampler.rb
+4
-4
No files found.
app/models/issue.rb
View file @
e9ebc108
...
...
@@ -131,7 +131,7 @@ class Issue < ApplicationRecord
when
'due_date'
then
order_due_date_asc
when
'due_date_asc'
then
order_due_date_asc
when
'due_date_desc'
then
order_due_date_desc
when
'relative_position'
then
order_relative_position_asc
when
'relative_position'
then
order_relative_position_asc
.
with_order_id_desc
else
super
end
...
...
changelogs/unreleased/64974-remove-livesum-from-ruby-sampler-metrics.yml
0 → 100644
View file @
e9ebc108
---
title
:
Remove :livesum from RubySampler metrics
merge_request
:
31047
author
:
type
:
fixed
changelogs/unreleased/bw-add-index-for-relative-position.yml
0 → 100644
View file @
e9ebc108
---
title
:
Add index for issues on relative position, project, and state for manual sorting
merge_request
:
30542
author
:
type
:
fixed
db/migrate/20190709220143_add_index_to_issues_relative_position.rb
0 → 100644
View file @
e9ebc108
# frozen_string_literal: true
class
AddIndexToIssuesRelativePosition
<
ActiveRecord
::
Migration
[
5.1
]
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
disable_ddl_transaction!
INDEX_NAME
=
'index_issues_on_project_id_and_state_and_rel_position_and_id'
.
freeze
def
up
add_concurrent_index
:issues
,
[
:project_id
,
:state
,
:relative_position
,
:id
],
order:
{
id: :desc
},
name:
INDEX_NAME
end
def
down
remove_concurrent_index_by_name
:issues
,
INDEX_NAME
end
end
db/schema.rb
View file @
e9ebc108
...
...
@@ -1682,6 +1682,7 @@ ActiveRecord::Schema.define(version: 2019_07_15_114644) do
t
.
index
[
"project_id"
,
"created_at"
,
"id"
,
"state"
],
name:
"index_issues_on_project_id_and_created_at_and_id_and_state"
,
using: :btree
t
.
index
[
"project_id"
,
"due_date"
,
"id"
,
"state"
],
name:
"idx_issues_on_project_id_and_due_date_and_id_and_state_partial"
,
where:
"(due_date IS NOT NULL)"
,
using: :btree
t
.
index
[
"project_id"
,
"iid"
],
name:
"index_issues_on_project_id_and_iid"
,
unique:
true
,
using: :btree
t
.
index
[
"project_id"
,
"state"
,
"relative_position"
,
"id"
],
name:
"index_issues_on_project_id_and_state_and_rel_position_and_id"
,
order:
{
id: :desc
},
using: :btree
t
.
index
[
"project_id"
,
"updated_at"
,
"id"
,
"state"
],
name:
"index_issues_on_project_id_and_updated_at_and_id_and_state"
,
using: :btree
t
.
index
[
"relative_position"
],
name:
"index_issues_on_relative_position"
,
using: :btree
t
.
index
[
"state"
],
name:
"index_issues_on_state"
,
using: :btree
...
...
lib/gitlab/metrics/samplers/ruby_sampler.rb
View file @
e9ebc108
...
...
@@ -30,18 +30,18 @@ module Gitlab
def
init_metrics
metrics
=
{
file_descriptors:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:file
,
:descriptors
),
'File descriptors used'
,
labels
,
:livesum
),
memory_bytes:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:memory
,
:bytes
),
'Memory used'
,
labels
,
:livesum
),
file_descriptors:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:file
,
:descriptors
),
'File descriptors used'
,
labels
),
memory_bytes:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:memory
,
:bytes
),
'Memory used'
,
labels
),
process_cpu_seconds_total:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:process
,
:cpu_seconds_total
),
'Process CPU seconds total'
),
process_max_fds:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:process
,
:max_fds
),
'Process max fds'
),
process_resident_memory_bytes:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:process
,
:resident_memory_bytes
),
'Memory used'
,
labels
,
:livesum
),
process_resident_memory_bytes:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:process
,
:resident_memory_bytes
),
'Memory used'
,
labels
),
process_start_time_seconds:
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:process
,
:start_time_seconds
),
'Process start time seconds'
),
sampler_duration:
::
Gitlab
::
Metrics
.
counter
(
with_prefix
(
:sampler
,
:duration_seconds_total
),
'Sampler time'
,
labels
),
total_time:
::
Gitlab
::
Metrics
.
counter
(
with_prefix
(
:gc
,
:duration_seconds_total
),
'Total GC time'
,
labels
)
}
GC
.
stat
.
keys
.
each
do
|
key
|
metrics
[
key
]
=
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:gc_stat
,
key
),
to_doc_string
(
key
),
labels
,
:livesum
)
metrics
[
key
]
=
::
Gitlab
::
Metrics
.
gauge
(
with_prefix
(
:gc_stat
,
key
),
to_doc_string
(
key
),
labels
)
end
metrics
...
...
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