• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prometheus / client_ruby
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: fix_with_labels
DEFAULT BRANCH: master
Repo Added 16 May 2014 05:49AM UTC
Files 32
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH fix_label_order_bug
branch: fix_label_order_bug
CHANGE BRANCH
x
Reset
  • fix_label_order_bug
  • RichiH-patch-1
  • add_script_name_in_collector_path
  • all_metrics_one_file
  • beorn7/doc
  • beorn7/license-cleanup
  • beorn7/meta
  • beorn7/push
  • bump_version_0_11_alpha
  • coveralls
  • document_startup_file_cleanup
  • dont_revalidate_symbols_on_increment
  • exchangeable-value-types
  • fix_all_labels_preset_warning
  • fix_jruby_travis
  • fix_with_labels
  • grobie/add-path-substitution-example
  • grobie/basic-auth
  • grobie/ensure-non-nil-values
  • grobie/fix-gauge-increment-documentation
  • grobie/fix-histogram-bucket-metrics
  • grobie/fix-lint-warnings
  • grobie/fix-rubocop
  • grobie/fix-travis-build-old-ruby
  • grobie/middleware-rewrite
  • grobie/sanitize-http-path-by-default
  • grobie/validate-metric-name
  • gzip
  • improved_documentation
  • init_metrics_without_labels
  • labelset_validator_cache_mutex
  • labelset_validator_no_cache
  • labelset_validator_nocache_norevalidatesymbols
  • master
  • multiprocess
  • push
  • refactor
  • remove-counter-decrement
  • remove-json-format
  • remove_deprecated_escaping
  • repo_sync
  • sinjo-add-missing-require
  • sinjo-bump-version
  • sinjo-consistent-metric-stores
  • sinjo-default-unaggregated-gauges
  • sinjo-improve-path-handling
  • sinjo-label-values-to-s
  • sinjo-per-store-docs
  • sinjo-readme-tweaks
  • sinjo-remove-flexible-rack-labels
  • sinjo-remove-old-version-pins
  • sinjo-reopen-on-fork
  • sinjo-unaggregated-gauges
  • sinjo-update-gemspec
  • sinjo-update-gemspec-authors
  • sinjo-update-maintainers
  • sinjo-wordsmithing
  • support_latest_rubies
  • support_ruby_3
  • textformat
  • travis-2.2.x
  • turn_on_rspec_warnings
  • update-example
  • use_monitor_instead_of_read_write_lock
  • v0.10.0
  • v0.10.0.pre.alpha.1
  • v0.10.0.pre.alpha.2
  • v0.11.0.pre.alpha.1
  • v0.3.0
  • v0.3.0.pre.rc.1
  • v0.3.1
  • v0.4.0
  • v0.4.1
  • v0.4.2
  • v0.5.0
  • v0.6.0
  • v0.7.0
  • v0.7.0.pre.rc.1
  • v0.7.1
  • v0.8.0
  • v0.9.0
  • v1.0.0
  • v1_0
  • v2.0.0
  • v2.1.0
  • v2_0
  • v2_1

pending completion
533

Pull #164

travis-ci

web-flow
Fix bug where different label orders lead to different results

In the DirectFileStore, in order to store the labels hash on disk, we
turn it into a "querystring". The way this is done, we'll end up with
different strings if the same hash is passed in with its keys in
different order.

Since this string is used to index into the file where we store the data,
this will lead to two different values being stored for the same hash.
This is fine in cases where the aggregation is :SUM, because they end up
getting summed when the Client is summarizing. But in :ALL aggregation,
for example, you will end up with one value or the other, randomly.

The test in this commit reproduces this problem.

This way of serializing the labels is a bit slower (see PR for details),
but it's not a huge impact in the big scheme of things, and it leads to
the correct result.

Signed-off-by: Daniel Magliola <danielmagliola@gocardless.com>
Pull Request #164: Fix bug where different label orders lead to different results

17 of 17 new or added lines in 2 files covered. (100.0%)

4491 of 4491 relevant lines covered (100.0%)

44.59 hits per line

Relevant lines Covered
Build:
Build:
4491 RELEVANT LINES 4491 COVERED LINES
44.59 HITS PER LINE
Source Files on fix_label_order_bug
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
533 fix_label_order_bug Fix bug where different label orders lead to different results In the DirectFileStore, in order to store the labels hash on disk, we turn it into a "querystring". The way this is done, we'll end up with different strings if the same hash is passe... Pull #164 28 Oct 2019 12:11PM UTC web-flow travis-ci pending completion  
532 fix_label_order_bug Fix bug where different label orders lead to different results In the DirectFileStore, in order to store the labels hash on disk, we turn it into a "querystring". The way this is done, we'll end up with different strings if the same hash is passe... push 28 Oct 2019 12:10PM UTC dmagliola travis-ci pending completion  
531 fix_label_order_bug Fix bug where different label orders lead to different results In the DirectFileStore, in order to store the labels hash on disk, we turn it into a "querystring". The way this is done, we'll end up with different strings if the same hash is passe... Pull #164 28 Oct 2019 12:08PM UTC web-flow travis-ci pending completion  
530 fix_label_order_bug Fix bug where different label orders lead to different results In the DirectFileStore, in order to store the labels hash on disk, we turn it into a "querystring". The way this is done, we'll end up with different strings if the same hash is passe... push 28 Oct 2019 12:04PM UTC dmagliola travis-ci pending completion  
See All Builds (639)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc