This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
60 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package metrics | ||
|
||
import ( | ||
"github.com/ipfs/go-metrics-interface" | ||
) | ||
|
||
var ( | ||
// the 1<<18+15 is to observe old file chunks that are 1<<18 + 14 in size | ||
metricsBuckets = []float64{1 << 6, 1 << 10, 1 << 14, 1 << 18, 1<<18 + 15, 1 << 22} | ||
|
||
timeMetricsBuckets = []float64{1, 10, 30, 60, 90, 120, 600} | ||
) | ||
|
||
func DupHist() metrics.Histogram { | ||
return metrics.New("recv_dup_blocks_bytes", "Summary of duplicate data blocks recived").Histogram(metricsBuckets) | ||
} | ||
|
||
func AllHist() metrics.Histogram { | ||
return metrics.New("recv_all_blocks_bytes", "Summary of all data blocks recived").Histogram(metricsBuckets) | ||
} | ||
|
||
func SentHist() metrics.Histogram { | ||
return metrics.New("sent_all_blocks_bytes", "Histogram of blocks sent by this bitswap").Histogram(metricsBuckets) | ||
} | ||
|
||
func SendTimeHist() metrics.Histogram { | ||
return metrics.New("send_times", "Histogram of how long it takes to send messages in this bitswap").Histogram(timeMetricsBuckets) | ||
} | ||
|
||
func PendingEngineGauge() metrics.Gauge { | ||
return metrics.New("pending_tasks", "Total number of pending tasks").Gauge() | ||
} | ||
|
||
func ActiveEngineGauge() metrics.Gauge { | ||
return metrics.New("active_tasks", "Total number of active tasks").Gauge() | ||
} | ||
|
||
func PendingBlocksGauge() metrics.Gauge { | ||
return metrics.New("pending_block_tasks", "Total number of pending blockstore tasks").Gauge() | ||
} | ||
|
||
func ActiveBlocksGauge() metrics.Gauge { | ||
return metrics.New("active_block_tasks", "Total number of active blockstore tasks").Gauge() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters