diff --git a/README.md b/README.md index 6b466000..24f54b2d 100644 --- a/README.md +++ b/README.md @@ -517,24 +517,26 @@ been started. #### Metrics per Hosts -|Name |Type | Description | -|----------------------------|---------|----------------------------| -|hackney.HOST.nb_requests |counter | Number of running requests | -|hackney.HOST.request_time |histogram| Request time | -|hackney.HOST.connect_time |histogram| Connect time | -|hackney.HOST.response_time |histogram| Response time | -|hackney.HOST.connect_timeout|counter | Number of connect timeout | -|hackney.HOST.connect_error |counter | Number of timeout errors | +|Name |Type | Description | +|----------------------------------|---------|-------------------------------------------| +|hackney.HOST.nb_requests |counter | Number of running requests | +|hackney.HOST.request_time |histogram| Request time | +|hackney.HOST.connect_time |histogram| Connect time | +|hackney.HOST.response_time |histogram| Response time | +|hackney.HOST.connect_timeout |counter | Number of connect timeout | +|hackney.HOST.connect_error |counter | Number of timeout errors | +|hackney_pool.HOST.new_connection |counter | Number of new pool connections per host | +|hackney_pool.HOST.reuse_connection|counter | Number of reused pool connections per host| #### Metrics per Pool -|Name |Type | Description | -|------------------------------|-----------|--------------------------------------------------------------------| -|hackney.POOLNAME.take_rate |meter | meter recording rate at which a connection is retrieved from the pool| -|hackney.POOLNAME.no_socket |counter | Count of new connections | -|hackney.POOLNAME.in_use_count |histogram| How many connections from the pool are used | -|hackney.POOLNAME.free_count |histogram| Number of free sockets in the pool | -|hackney.POOLNAME.queue_counter|histogram| queued clients | +|Name |Type | Description | +|----------------------------------|---------|----------------------------------------------------------------------| +|hackney_pool.POOLNAME.take_rate |meter | meter recording rate at which a connection is retrieved from the pool| +|hackney_pool.POOLNAME.no_socket |counter | Count of new connections | +|hackney_pool.POOLNAME.in_use_count|histogram| How many connections from the pool are used | +|hackney_pool.POOLNAME.free_count |histogram| Number of free sockets in the pool | +|hackney_pool.POOLNAME.queue_count |histogram| queued clients | ## Contribute diff --git a/doc/README.md b/doc/README.md index 8e06a59a..a62da807 100644 --- a/doc/README.md +++ b/doc/README.md @@ -517,24 +517,26 @@ been started. #### Metrics per Hosts -|Name |Type | Description | -|----------------------------|---------|----------------------------| -|hackney.HOST.nb_requests |counter | Number of running requests | -|hackney.HOST.request_time |histogram| Request time | -|hackney.HOST.connect_time |histogram| Connect time | -|hackney.HOST.response_time |histogram| Response time | -|hackney.HOST.connect_timeout|counter | Number of connect timeout | -|hackney.HOST.connect_error |counter | Number of timeout errors | +|Name |Type | Description | +|----------------------------------|---------|-------------------------------------------| +|hackney.HOST.nb_requests |counter | Number of running requests | +|hackney.HOST.request_time |histogram| Request time | +|hackney.HOST.connect_time |histogram| Connect time | +|hackney.HOST.response_time |histogram| Response time | +|hackney.HOST.connect_timeout |counter | Number of connect timeout | +|hackney.HOST.connect_error |counter | Number of timeout errors | +|hackney_pool.HOST.new_connection |counter | Number of new pool connections per host | +|hackney_pool.HOST.reuse_connection|counter | Number of reused pool connections per host| #### Metrics per Pool -|Name |Type | Description | -|------------------------------|-----------|--------------------------------------------------------------------| -|hackney.POOLNAME.take_rate |meter | meter recording rate at which a connection is retrieved from the pool| -|hackney.POOLNAME.no_socket |counter | Count of new connections | -|hackney.POOLNAME.in_use_count |histogram| How many connections from the pool are used | -|hackney.POOLNAME.free_count |histogram| Number of free sockets in the pool | -|hackney.POOLNAME.queue_counter|histogram| queued clients | +|Name |Type | Description | +|----------------------------------|---------|----------------------------------------------------------------------| +|hackney_pool.POOLNAME.take_rate |meter | meter recording rate at which a connection is retrieved from the pool| +|hackney_pool.POOLNAME.no_socket |counter | Count of new connections | +|hackney_pool.POOLNAME.in_use_count|histogram| How many connections from the pool are used | +|hackney_pool.POOLNAME.free_count |histogram| Number of free sockets in the pool | +|hackney_pool.POOLNAME.queue_count |histogram| queued clients | ## Contribute diff --git a/doc/overview.edoc b/doc/overview.edoc index 9a950d48..5f9cd177 100644 --- a/doc/overview.edoc +++ b/doc/overview.edoc @@ -512,24 +512,26 @@ been started. #### Metrics per Hosts -|Name |Type | Description | -|----------------------------|---------|----------------------------| -|hackney.HOST.nb_requests |counter | Number of running requests | -|hackney.HOST.request_time |histogram| Request time | -|hackney.HOST.connect_time |histogram| Connect time | -|hackney.HOST.response_time |histogram| Response time | -|hackney.HOST.connect_timeout|counter | Number of connect timeout | -|hackney.HOST.connect_error |counter | Number of timeout errors | +|Name |Type | Description | +|----------------------------------|---------|-------------------------------------------| +|hackney.HOST.nb_requests |counter | Number of running requests | +|hackney.HOST.request_time |histogram| Request time | +|hackney.HOST.connect_time |histogram| Connect time | +|hackney.HOST.response_time |histogram| Response time | +|hackney.HOST.connect_timeout |counter | Number of connect timeout | +|hackney.HOST.connect_error |counter | Number of timeout errors | +|hackney_pool.HOST.new_connection |counter | Number of new pool connections per host | +|hackney_pool.HOST.reuse_connection|counter | Number of reused pool connections per host| #### Metrics per Pool -|Name |Type | Description | -|------------------------------|-----------|--------------------------------------------------------------------| -|hackney.POOLNAME.take_rate |meter | meter recording rate at which a connection is retrieved from the pool| -|hackney.POOLNAME.no_socket |counter | Count of new connections | -|hackney.POOLNAME.in_use_count |histogram| How many connections from the pool are used | -|hackney.POOLNAME.free_count |histogram| Number of free sockets in the pool | -|hackney.POOLNAME.queue_counter|histogram| queued clients | +|Name |Type | Description | +|----------------------------------|---------|----------------------------------------------------------------------| +|hackney_pool.POOLNAME.take_rate |meter | meter recording rate at which a connection is retrieved from the pool| +|hackney_pool.POOLNAME.no_socket |counter | Count of new connections | +|hackney_pool.POOLNAME.in_use_count|histogram| How many connections from the pool are used | +|hackney_pool.POOLNAME.free_count |histogram| Number of free sockets in the pool | +|hackney_pool.POOLNAME.queue_count |histogram| queued clients | ## Contribute diff --git a/src/hackney_pool.erl b/src/hackney_pool.erl index 2197cef6..ab92de6d 100644 --- a/src/hackney_pool.erl +++ b/src/hackney_pool.erl @@ -639,7 +639,7 @@ init_metrics(PoolName) -> _ = metrics:new(Engine, counter, [hackney_pool, PoolName, no_socket]), _ = metrics:new(Engine, histogram, [hackney_pool, PoolName, in_use_count]), _ = metrics:new(Engine, histogram, [hackney_pool, PoolName, free_count]), - _ = metrics:new(Engine, histogram, [hackney_pool, PoolName, queue_counter]), + _ = metrics:new(Engine, histogram, [hackney_pool, PoolName, queue_count]), Engine. delete_metrics(Engine, PoolName) -> @@ -647,7 +647,7 @@ delete_metrics(Engine, PoolName) -> _ = metrics:delete(Engine, [hackney_pool, PoolName, no_socket]), _ = metrics:delete(Engine, [hackney_pool, PoolName, in_use_count]), _ = metrics:delete(Engine, [hackney_pool, PoolName, free_count]), - _ = metrics:delete(Engine, [hackney_pool, PoolName, queue_counter]), + _ = metrics:delete(Engine, [hackney_pool, PoolName, queue_count]), ok.