mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-27 12:51:05 +00:00
* docs: add initial notes on stats * feat: initial refactor of stats to metrics * feat: add support for placeholder metrics This is helpful for tracking metrics prior to knowing the remote peers id * fix: add metrics tests and fix issues * fix: always clear the dial timeout timer * docs: add metrics to api doc * chore: apply suggestions from code review Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio> * docs: update metrics docs * fix: call metrics.onDisconnect * docs(config): add example headers so they appear in the TOC * docs(config): add metrics configuration * docs(relay): fix relay configuration docs
24 lines
800 B
JavaScript
24 lines
800 B
JavaScript
'use strict'
|
|
|
|
module.exports = {
|
|
DENY_TTL: 5 * 60 * 1e3, // How long before an errored peer can be dialed again
|
|
DENY_ATTEMPTS: 5, // Num of unsuccessful dials before a peer is permanently denied
|
|
DIAL_TIMEOUT: 30e3, // How long in ms a dial attempt is allowed to take
|
|
MAX_COLD_CALLS: 50, // How many dials w/o protocols that can be queued
|
|
MAX_PARALLEL_DIALS: 100, // Maximum allowed concurrent dials
|
|
MAX_PER_PEER_DIALS: 4, // Allowed parallel dials per DialRequest
|
|
QUARTER_HOUR: 15 * 60e3,
|
|
PRIORITY_HIGH: 10,
|
|
PRIORITY_LOW: 20,
|
|
METRICS: {
|
|
computeThrottleMaxQueueSize: 1000,
|
|
computeThrottleTimeout: 2000,
|
|
movingAverageIntervals: [
|
|
60 * 1000, // 1 minute
|
|
5 * 60 * 1000, // 5 minutes
|
|
15 * 60 * 1000 // 15 minutes
|
|
],
|
|
maxOldPeersRetention: 50
|
|
}
|
|
}
|