summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | Fix broken spec and small refactor. #3945Rubén Dávila2015-12-302-29/+275
| | | | | | | | | |
* | | | | | | | | | New implementation for highlighting diff files. #3945Rubén Dávila2015-12-301-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * It is more performant given now we process all the diff file instead of processing line by line. * Multiline comments are highlighted correctly.
* | | | | | | | | | Add syntax highlighting to diff view. #3945Rubén Dávila2015-12-281-0/+11
|/ / / / / / / / /
* | | | | | | | | Handle missing settings table for metricsYorick Peterse2015-12-281-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures we can still boot, even when the "application_settings" table doesn't exist.
* | | | | | | | Merge branch 'influxdb' into 'master' Dmitriy Zaporozhets2015-12-2813-0/+851
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Storing of application metrics in InfluxDB This adds support for tracking metrics in InfluxDB, which in turn can be visualized using Grafana. For more information see #2936. See merge request !2042
| * | | | | | | | Fixed styling of MetricsWorker specsYorick Peterse2015-12-281-1/+1
| | | | | | | | |
| * | | | | | | | Track object counts using the "allocations" GemYorick Peterse2015-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to track the counts of actual classes instead of "T_XXX" nodes. This is only enabled on CRuby as it uses CRuby specific APIs.
| * | | | | | | | Support for instrumenting class hierarchiesYorick Peterse2015-12-171-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used to (for example) instrument all ActiveRecord models.
| * | | | | | | | Only track method calls above a certain thresholdYorick Peterse2015-12-171-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures we don't end up wasting resources by tracking method calls that only take a few microseconds. By default the threshold is 10 milliseconds but this can be changed using the gitlab.yml configuration file.
| * | | | | | | | Allow filtering of what methods to instrumentYorick Peterse2015-12-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to determine if a method should be instrumented or not using a block.
| * | | | | | | | Drop empty tag values from metricsYorick Peterse2015-12-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InfluxDB throws an error when trying to store a list of tags where one or more have an empty value.
| * | | | | | | | Cast values to strings before escaping themYorick Peterse2015-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that e.g. line numbers used in tags are first casted to strings.
| * | | | | | | | Track location information as tagsYorick Peterse2015-12-172-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the information to be displayed when using certain functions (e.g. top()) as well as making it easier to aggregate on a per file basis.
| * | | | | | | | Added specs for MetricsWorkerYorick Peterse2015-12-171-0/+40
| | | | | | | | |
| * | | | | | | | Replace double quotes when obfuscating SQLYorick Peterse2015-12-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InfluxDB escapes double quotes upon output which makes it a pain to deal with. This ensures that if we're using PostgreSQL we don't store any queries containing double quotes in InfluxDB, solving the escaping problem.
| * | | | | | | | Track object count types as tagsYorick Peterse2015-12-171-1/+2
| | | | | | | | |
| * | | | | | | | Only instrument methods defined directlyYorick Peterse2015-12-171-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using instrument_methods/instrument_instance_methods we only want to instrument methods defined directly in a class, not those included via mixins (e.g. whatever RSpec throws in during development). In case an externally included method _has_ to be instrumented we can still use the regular instrument_method/instrument_instance_method methods.
| * | | | | | | | Added Instrumentation.configureYorick Peterse2015-12-171-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to instrument multiple modules without having to type the full namespace over and over again.
| * | | | | | | | Methods for instrumenting multiple methodsYorick Peterse2015-12-171-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The methods Instrumentation.instrument_methods and Instrumentation.instrument_instance_methods can be used to instrument all methods of a module at once.
| * | | | | | | | Use custom code for instrumenting method callsYorick Peterse2015-12-172-46/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of ActiveSupport would slow down instrumented method calls by about 180x due to: 1. ActiveSupport itself not being the fastest thing on the planet 2. caller_locations() having quite some overhead The use of caller_locations() has been removed because it's not _that_ useful since we already know the full namespace of receivers and the names of the called methods. The use of ActiveSupport has been replaced with some custom code that's generated using eval() (which can be quite a bit faster than using define_method). This new setup results in instrumented methods only being about 35-40x slower (compared to non instrumented methods).
| * | | | | | | | Use string evaluation for method instrumentationYorick Peterse2015-12-172-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is faster than using define_method since we don't have to keep block bindings around.
| * | | | | | | | Storing of application metrics in InfluxDBYorick Peterse2015-12-1713-0/+678
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to write application metrics (e.g. SQL timings) to InfluxDB. These metrics can in turn be visualized using Grafana, or really anything else that can read from InfluxDB. These metrics can be used to track application performance over time, between different Ruby versions, different GitLab versions, etc. == Transaction Metrics Currently the following is tracked on a per transaction basis (a transaction is a Rails request or a single Sidekiq job): * Timings per query along with the raw (obfuscated) SQL and information about what file the query originated from. * Timings per view along with the path of the view and information about what file triggered the rendering process. * The duration of a request itself along with the controller/worker class and method name. * The duration of any instrumented method calls (more below). == Sampled Metrics Certain metrics can't be directly associated with a transaction. For example, a process' total memory usage is unrelated to any running transactions. While a transaction can result in the memory usage going up there's no accurate way to determine what transaction is to blame, this becomes especially problematic in multi-threaded environments. To solve this problem there's a separate thread that takes samples at a fixed interval. This thread (using the class Gitlab::Metrics::Sampler) currently tracks the following: * The process' total memory usage. * The number of file descriptors opened by the process. * The amount of Ruby objects (using ObjectSpace.count_objects). * GC statistics such as timings, heap slots, etc. The default/current interval is 15 seconds, any smaller interval might put too much pressure on InfluxDB (especially when running dozens of processes). == Method Instrumentation While currently not yet used methods can be instrumented to track how long they take to run. Unlike the likes of New Relic this doesn't require modifying the source code (e.g. including modules), it all happens from the outside. For example, to track `User.by_login` we'd add the following code somewhere in an initializer: Gitlab::Metrics::Instrumentation. instrument_method(User, :by_login) to instead instrument an instance method: Gitlab::Metrics::Instrumentation. instrument_instance_method(User, :save) Instrumentation for either all public model methods or a few crucial ones will be added in the near future, I simply haven't gotten to doing so just yet. == Configuration By default metrics are disabled. This means users don't have to bother setting anything up if they don't want to. Metrics can be enabled by editing one's gitlab.yml configuration file (see config/gitlab.yml.example for example settings). == Writing Data To InfluxDB Because InfluxDB is still a fairly young product I expect the worse. Data loss, unexpected reboots, the database not responding, you name it. Because of this data is _not_ written to InfluxDB directly, instead it's queued and processed by Sidekiq. This ensures that users won't notice anything when InfluxDB is giving trouble. The metrics worker can be started in a standalone manner as following: bundle exec sidekiq -q metrics The corresponding class is called MetricsWorker.
* | | | | | | | | Merge branch 'mention-all' into 'master' Robert Speicher2015-12-273-3/+23
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only allow group/project members to mention `@all` Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3473 See merge request !2205
| * | | | | | | | | Fix specmention-allDouwe Maan2015-12-251-0/+2
| | | | | | | | | |
| * | | | | | | | | Merge branch 'master' into mention-allDouwe Maan2015-12-242-1/+16
| |\ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|/ / | | |/| | | | | | |
| * | | | | | | | | Fix specsDouwe Maan2015-12-242-0/+5
| | | | | | | | | |
| * | | | | | | | | Only allow group/project members to mention `@all`Douwe Maan2015-12-241-3/+16
| | | | | | | | | |
* | | | | | | | | | Merge branch 'close-open-ajax-issue' into 'master' Robert Speicher2015-12-252-1/+97
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | open and close issue via ajax request. With tests Close and Reopen issues with ajax request. See merge request !2164
| * | | | | | | | | removes unused `alert` from issue spec. Requires flash in the ↵close-open-ajax-issueJacob Schatz2015-12-232-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *implementation* instead of the spec.
| * | | | | | | | | adds test for issue close/reopen failureJacob Schatz2015-12-232-4/+60
| | | | | | | | | |
| * | | | | | | | | resolves conflicts with new buttonsJacob Schatz2015-12-2320-57/+576
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | fixes tests to work with jasmine/jqueryJacob Schatz2015-12-232-13/+16
| | | | | | | | | | |
| * | | | | | | | | | adds alerts for when http request errors out in some way.Jacob Schatz2015-12-211-10/+1
| | | | | | | | | | |
| * | | | | | | | | | clarifies tests with methods like `toBeVisible()` etc.Jacob Schatz2015-12-211-12/+9
| | | | | | | | | | |
| * | | | | | | | | | updates tests style for four-phase-testing as per: ↵Jacob Schatz2015-12-211-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://robots.thoughtbot.com/four-phase-test
| * | | | | | | | | | open and close issue via ajax request. With testsJacob Schatz2015-12-212-1/+40
| | | | | | | | | | |
* | | | | | | | | | | Merge branch 'revert_votes_back' into 'master' Dmitriy Zaporozhets2015-12-252-3/+15
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert vote buttons back to issue and MR pages https://gitlab.com/gitlab-org/gitlab-ce/issues/3672 /cc @dzaporozhets @JobV ![joxi_screenshot_1450809309400](/uploads/379a75505e0d5f24e743aa0a6a6684e2/joxi_screenshot_1450809309400.png) See merge request !2206
| * | | | | | | | | | satisfy rubocoprevert_votes_backValery Sizov2015-12-251-1/+1
| | | | | | | | | | |
| * | | | | | | | | | add sorting of awardsValery Sizov2015-12-251-0/+7
| | | | | | | | | | |
| * | | | | | | | | | revert back vote buttons to issue and MR pagesValery Sizov2015-12-251-3/+8
| | |_|_|_|_|_|_|_|/ | |/| | | | | | | |
* | | | | | | | | | Merge branch 'rs-opengraph' into 'master' Douwe Maan2015-12-252-0/+147
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Open Graph meta tags See merge request !2192
| * | | | | | | | | Satisfy RubocopDouwe Maan2015-12-251-2/+2
| | | | | | | | | |
| * | | | | | | | | Add support for `twitter:label` meta tagsrs-opengraphRobert Speicher2015-12-242-0/+47
| | | | | | | | | |
| * | | | | | | | | Truncate page_description to 30 wordsRobert Speicher2015-12-241-0/+13
| | | | | | | | | |
| * | | | | | | | | Account for `@project.description` being nilRobert Speicher2015-12-231-0/+8
| | | | | | | | | |
| * | | | | | | | | Add page descriptions and imagesRobert Speicher2015-12-231-0/+79
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A limited number of pages have defined their own descriptions, but otherwise we default to the Project's description (if `@project` is set), or the old `brand_title` fallback. The image will either be the uploaded project icon (never a generated one), the user's uploaded icon or Gravatar, or, finally, the GitLab logo.
* | | | | | | | | Merge branch 'support-api-lookup-by-username' into 'master' Dmitriy Zaporozhets2015-12-251-0/+7
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add API support for looking up a user by username Needed to support Huboard See merge request !2089
| * | | | | | | | | Add API support for looking up a user by usernameStan Hu2015-12-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed to support Huboard
* | | | | | | | | | specs for forced two-factor authentication and grace periodGabriel Mazetto2015-12-241-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplified code and fixed stuffs
* | | | | | | | | | WIP require two factor authenticationGabriel Mazetto2015-12-241-0/+1
| |_|_|_|/ / / / / |/| | | | | | | |