rookout 0.1.50 → 0.1.52

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72f208b3a47ef61e59b2123afe3e666a2f3efa8295ddec10950e221e5547770a
4
- data.tar.gz: 216a478be4998de21db6b2df156123d6cde587a54369914d93ba2f3ef8f9b5a7
3
+ metadata.gz: 8854b65da599e09232b62dadbe87cb092dccd93e2a3153dae13e5aa703fcd4e0
4
+ data.tar.gz: 8fb0f255e23b6eac93f293632a4230e7b24fa80fcdd49d0288d78582ebd121e0
5
5
  SHA512:
6
- metadata.gz: c9c2e1c91cba199a499fb360f519dcce9081f9c5693cf9919aaff369cd2389534900be7b580e03a3b9ef24e91394db0eec9d25e3968163de87a9390aec288392
7
- data.tar.gz: 476c8d023ae8e04214693c3b929d0dae31bcf364cf23cc443bf3aab2c29bd05f08db4646a366cb54b4b5208d188df22024886bd35421849c73e331db720eb960
6
+ metadata.gz: a0008b3f484e1967418b7cd8bd9db5b8550658a1eb211b5f1ce6f6e731a9fca6733361fd03413f1904dd2aebea889be20418b5fcde963ffd14d116290e8421cf
7
+ data.tar.gz: 3d2282c21829a747f961e6063435433aa19e88be46ae3f572c8239355ef6dfda585fd12c8d12c4b401d427d7fd0f9040c744b0c27a673b2d9a87a0ac6705ca56
@@ -48,7 +48,9 @@ module Rookout
48
48
  if @has_quota
49
49
  now_ns = Utils.time_to_nanoseconds start_time
50
50
  current_window_key, = timestamp_to_window_keys now_ns
51
- @mutex.synchronize { record_usage current_window_key, Utils.time_to_nanoseconds(Time.now) - now_ns }
51
+ time_used = Utils.time_to_nanoseconds(Time.now) - now_ns
52
+ time_recorded = time_used > Config.min_rate_limit_value_ns ? time_used : Config.min_rate_limit_value_ns
53
+ @mutex.synchronize { record_usage current_window_key, time_recorded }
52
54
  end
53
55
  # Reduce active count
54
56
  @mutex.synchronize { @active_count -= 1 }
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- COMMIT = "9f3ecb29fbadc0c8f66233c9c44be100a912e577".freeze
2
+ COMMIT = "3e5cbb5882385eff12a3113f93dfde79418d5061".freeze
3
3
  end
@@ -34,7 +34,7 @@ module Rookout
34
34
  Rookout::Config.agent_com_ping_interval = 10
35
35
  Rookout::Config.agent_com_ping_timeout = 30
36
36
  Rookout::Config.agent_com_flush_timeout = 3
37
- Rookout::Config.agent_com_max_queued_messages = 100
37
+ Rookout::Config.agent_com_max_queued_messages = 1000
38
38
 
39
39
  attr_accessor :backoff_factor
40
40
  attr_accessor :backoff_reset_time
@@ -50,9 +50,9 @@ module Rookout
50
50
  attr_accessor :output_bucket_refresh_rate
51
51
 
52
52
  Rookout::Config.output_max_status_updates = 200
53
- Rookout::Config.output_max_aug_messages = 100
53
+ Rookout::Config.output_max_aug_messages = 1000
54
54
  Rookout::Config.output_max_log_items = 200
55
- Rookout::Config.output_bucket_refresh_rate = 10
55
+ Rookout::Config.output_bucket_refresh_rate = 5
56
56
 
57
57
  attr_accessor :instrumentation_max_aug_time
58
58
 
@@ -82,11 +82,13 @@ module Rookout
82
82
  attr_accessor :global_rate_limit_window_size
83
83
  attr_accessor :global_rate_limit
84
84
  attr_accessor :using_global_rate_limiter
85
+ attr_accessor :min_rate_limit_value_ns
85
86
 
86
87
  Rookout::Config.global_rate_limit_quota = ""
87
88
  Rookout::Config.global_rate_limit_window_size = ""
88
89
  Rookout::Config.global_rate_limit = ""
89
90
  Rookout::Config.using_global_rate_limiter = false
91
+ Rookout::Config.min_rate_limit_value_ns = 125 * 1000
90
92
 
91
93
  def update_config configuration
92
94
  update_var2_config configuration
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- VERSION = "0.1.50".freeze
2
+ VERSION = "0.1.52".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rookout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.50
4
+ version: 0.1.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liran Haimovitch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-09 00:00:00.000000000 Z
11
+ date: 2023-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: binding_of_caller