Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-20Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot
2019-02-14Update Metrics references to Object pathSarah Yasonik
On reload, references to Metrics within classes in the Gitlab::Metrics module fail. Update all references to ::Gitlab::Metrics so that constant lookup finds the right module in development. This fix should not impact production.
2018-11-17Enable even more frozen string for lib/gitlabgfyoung
Enables frozen string for the following: * lib/gitlab/hook_data/**/*.rb * lib/gitlab/i18n/**/*.rb * lib/gitlab/import/**/*.rb * lib/gitlab/import_export/**/*.rb * lib/gitlab/kubernetes/**/*.rb * lib/gitlab/legacy_github_import/**/*.rb * lib/gitlab/manifest_import/**/*.rb * lib/gitlab/metrics/**/*.rb * lib/gitlab/middleware/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
2018-07-09Updates from `rubocop -a`Lin Jen-Shin
2018-01-29Rename Concern -> MethodsPawel Chojnacki
2018-01-29Refactor metrics to use metrics dsl notationPawel Chojnacki
2018-01-29Fix code after refactoringPawel Chojnacki
2018-01-29cleanup method callPawel Chojnacki
2018-01-29Actually make the new methods workPawel Chojnacki
2018-01-29Initiaal implementation of metrics concernPawel Chojnacki
2017-12-26Use Concurrent::AtomicReference instead AtomicFixnumOswaldo Ferreira
2017-12-21Merge branch 'pawel/reduce_cardinality_of_prometheus_metrics' into 'master'Douwe Maan
Reduce cardinality of some of GitLab's Prometheus metrics and fix observed duration reporting. Closes #41045 See merge request gitlab-org/gitlab-ce!15881
2017-12-21Use seconds where possible, and convert to milliseconds for Influxdb consumptionPawel Chojnacki
2017-12-20use in_milliseconds rails helperPawel Chojnacki
2017-12-19Fix tests and formattingPawel Chojnacki
2017-12-13Use class variable and add rubocop exceptionPawel Chojnacki
2017-12-12Expire feature flag cache after 1minutePawel Chojnacki
2017-12-12use class variables instead of CONSTANTsPawel Chojnacki
2017-12-12move call_measurement_enabled? method to the bottom of the filePawel Chojnacki
2017-12-12Use AtomicFixNum to implement CAS isolated cache update.Pawel Chojnacki
i.e. Using compare and swap we update the expires_at value. The thread that actually is able to update this value will also set the cache holding method_call enabled state
2017-12-12Implemente measurement enabled cache using AtomicReferencePawel Chojnacki
2017-12-12Set cache expire only once the cache is filled,Pawel Chojnacki
to avoid situation where old result is returned in parallel thread.
2017-12-12Implement simple in memory cache that expires after 5 minutesPawel Chojnacki
2017-12-12Cache feature check for 5 minutes for MethodCall instrumentation togglePawel Chojnacki
2017-12-12Make `System.monotonic_time` retun seconds represented by float with ↵Pawel Chojnacki
microsecond precision
2017-11-24Use feature flag instead of application settigns to control if method calls ↵Pawel Chojnacki
should be instrumented
2017-11-24Use only real duration to measure method call performance via PrometheusPawel Chojnacki
2017-11-24check method timing threshold when observing method performancePawel Chojnacki
2017-11-24Move prometheus middle ware to prometheus initialized.Pawel Chojnacki
2017-11-03Add missing mutex guard to method call metricsPawel Chojnacki
2017-11-02Move labels to be initialized in constructorPawel Chojnacki
2017-11-02Add info about prometheus bucketsPawel Chojnacki
+ fix cpu time
2017-11-02Fix rspec errors, and add more tests to MethodCall and ActionViewPawel Chojnacki
2017-11-02Fix rubocop warningsPawel Chojnacki
2017-11-02Split call name to module and method namePawel Chojnacki
2017-11-02More parsable labels in method performance measurementsPawel Chojnacki
2017-11-02Tune bucket sizes an action labelsPawel Chojnacki
2017-11-02Introduce missing Action conceptPawel Chojnacki
2017-11-02Cleanup sampling code and fix bug with samplers running without sleepPawel Chojnacki
2017-11-02Transaction and method instrumentationPawel Chojnacki
2016-07-28Reduce instrumentation overheadYorick Peterse
This reduces the overhead of the method instrumentation code primarily by reducing the number of method calls. There are also some other small optimisations such as not casting timing values to Floats (there's no particular need for this), using Symbols for method call metric names, and reducing the number of Hash lookups for instrumented methods. The exact impact depends on the code being executed. For example, for a method that's only called once the difference won't be very noticeable. However, for methods that are called many times the difference can be more significant. For example, the loading time of a large commit (nrclark/dummy_project@81ebdea5df2fb42e59257cb3eaad671a5c53ca36) was reduced from around 19 seconds to around 15 seconds using these changes.
2016-06-28Use clock_gettime for all performance timestampsYorick Peterse
Process.clock_gettime allows getting the real time in nanoseconds as well as allowing one to get a monotonic timestamp. This offers greater accuracy without the overhead of having to allocate a Time instance. In general using Time.now/Time.new is about 2x slower than using Process.clock_gettime(). For example: require 'benchmark/ips' Benchmark.ips do |bench| bench.report 'Time.now' do Time.now.to_f end bench.report 'clock_gettime' do Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) end bench.compare! end Running this benchmark gives: Calculating ------------------------------------- Time.now 108.052k i/100ms clock_gettime 125.984k i/100ms ------------------------------------------------- Time.now 2.343M (± 7.1%) i/s - 11.670M clock_gettime 4.979M (± 0.8%) i/s - 24.945M Comparison: clock_gettime: 4979393.8 i/s Time.now: 2342986.8 i/s - 2.13x slower Another benefit of using Process.clock_gettime() is that we can simplify the code a bit since it can give timestamps in nanoseconds out of the box.
2016-06-17Track method call times/counts as a single metricYorick Peterse
Previously we'd create a separate Metric instance for every method call that would exceed the method call threshold. This is problematic because it doesn't provide us with information to accurately get the _total_ execution time of a particular method. For example, if the method "Foo#bar" was called 4 times with a runtime of ~10 milliseconds we'd end up with 4 different Metric instances. If we were to then get the average/95th percentile/etc of the timings this would be roughly 10 milliseconds. However, the _actual_ total time spent in this method would be around 40 milliseconds. To solve this problem we now create a single Metric instance per method. This Metric instance contains the _total_ real/CPU time and the call count for every instrumented method.