Sampling data at a fixed interval means we can potentially miss data
from events occurring between sampling intervals. For example, say we
sample data every 15 seconds but Unicorn workers get killed after 10
seconds. In this particular case it's possible to miss interesting data
as the sampler will never get to actually submitting data.
To work around this (at least for the most part) the sampling interval
is randomized as following:
1. Take the user specified sampling interval (15 seconds by default)
2. Divide it by 2 (referred to as "half" below)
3. Generate a range (using a step of 0.1) from -"half" to "half"
4. Every time the sampler goes to sleep we'll grab the user provided
interval and add a randomly chosen "adjustment" to it while making
sure we don't pick the same value twice in a row.
For a specified timeout of 15 this means the actual intervals can be
anywhere between 7.5 and 22.5, but never can the same interval be used
twice in a row.
The rationale behind this change is that on dev.gitlab.org I'm sometimes
seeing certain Gitlab::Git/Rugged objects being retained, but only for a
few minutes every 24 hours. Knowing the code of Gitlab and how much
memory it uses/leaks I suspect we're missing data due to workers getting
terminated before the sampler can write its data to InfluxDB.
merge request close message moved and merge request now refered by `!`.
Fixes#4161

See merge request !2387
Block the reported user before destroying the record
This is intended to prevent the user from creating new objects while the
transaction that removes them is being run, resulting in objects with
nil authors which can then not be edited.
See https://gitlab.com/gitlab-org/gitlab-ce/issues/7117
See merge request !2402
Make sure time_ago_with_tooltip is using a Time object
Somehow this test existed on EE but not in CE, so it started failing
after a bad CE-to-EE merge.
See merge request !2398
This is intended to prevent the user from creating new objects while the
transaction that removes them is being run, resulting in objects with
nil authors which can then not be edited.
See https://gitlab.com/gitlab-org/gitlab-ce/issues/7117
Revert "Remove the `:coffee` and `:coffeescript` Haml filters"
This reverts commit ae7de2f851.
Several files in EE still use the `:coffeescript` filter and
I don't have time to fix them before the CE-to-EE merge.
See https://gitlab.com/gitlab-org/gitlab-ee/builds/553647
I will reintroduce this change in a future MR.
See merge request !2400
Improve admin area button style
A lot of the buttons in the top right in the admin area were too big. This makes those the new `btn-nr` size which seems to look nice.
## User buttons
### Current

### New

## Project edit button
### Current

### New 
## Label button
### Current

### New

cc/ @jschatz1 @creamzy @skyruler
See merge request !2351