mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-160) Revise connection metrics
The redis pooler connection metric used "metric_prefix" which is misleading, so split this into connpool_type and connpool_provider. Also remove some earlier jruby compatibility code to reduce rebase conflicts when this is rebased on top of Matt's changes.
This commit is contained in:
parent
5c38ba240a
commit
72564de4b4
7 changed files with 33 additions and 24 deletions
|
|
@ -79,7 +79,8 @@ EOT
|
|||
let(:vmname) { 'vm1' }
|
||||
let(:redis_connection_pool) { Vmpooler::PoolManager::GenericConnectionPool.new(
|
||||
metrics: metrics,
|
||||
metric_prefix: 'redis_connection_pool',
|
||||
connpool_type: 'redis_connection_pool',
|
||||
connpool_provider: 'testprovider',
|
||||
size: 1,
|
||||
timeout: 5
|
||||
) { MockRedis.new }
|
||||
|
|
@ -167,7 +168,7 @@ EOT
|
|||
end
|
||||
|
||||
it 'should record metrics' do
|
||||
expect(metrics).to receive(:timing).with('redis_connection_pool.waited', 0)
|
||||
expect(metrics).to receive(:timing).with('connection_waited.redis_connection_pool.testprovider', 0)
|
||||
expect(metrics).to receive(:timing).with("destroy.#{pool}", finish)
|
||||
|
||||
subject.destroy_vm_and_log(vmname, vm_object, pool, data_ttl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue