metrics.go 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright 2015 The go-ethereum Authors
  2. // This file is part of the go-ethereum library.
  3. //
  4. // The go-ethereum library is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU Lesser General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // The go-ethereum library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public License
  15. // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
  16. // Contains the metrics collected by the downloader.
  17. package downloader
  18. import (
  19. "github.com/ethereum/go-ethereum/metrics"
  20. )
  21. var (
  22. hashInMeter = metrics.NewMeter("eth/downloader/hashes/in")
  23. hashReqTimer = metrics.NewTimer("eth/downloader/hashes/req")
  24. hashDropMeter = metrics.NewMeter("eth/downloader/hashes/drop")
  25. hashTimeoutMeter = metrics.NewMeter("eth/downloader/hashes/timeout")
  26. blockInMeter = metrics.NewMeter("eth/downloader/blocks/in")
  27. blockReqTimer = metrics.NewTimer("eth/downloader/blocks/req")
  28. blockDropMeter = metrics.NewMeter("eth/downloader/blocks/drop")
  29. blockTimeoutMeter = metrics.NewMeter("eth/downloader/blocks/timeout")
  30. headerInMeter = metrics.NewMeter("eth/downloader/headers/in")
  31. headerReqTimer = metrics.NewTimer("eth/downloader/headers/req")
  32. headerDropMeter = metrics.NewMeter("eth/downloader/headers/drop")
  33. headerTimeoutMeter = metrics.NewMeter("eth/downloader/headers/timeout")
  34. bodyInMeter = metrics.NewMeter("eth/downloader/bodies/in")
  35. bodyReqTimer = metrics.NewTimer("eth/downloader/bodies/req")
  36. bodyDropMeter = metrics.NewMeter("eth/downloader/bodies/drop")
  37. bodyTimeoutMeter = metrics.NewMeter("eth/downloader/bodies/timeout")
  38. receiptInMeter = metrics.NewMeter("eth/downloader/receipts/in")
  39. receiptReqTimer = metrics.NewTimer("eth/downloader/receipts/req")
  40. receiptDropMeter = metrics.NewMeter("eth/downloader/receipts/drop")
  41. receiptTimeoutMeter = metrics.NewMeter("eth/downloader/receipts/timeout")
  42. stateInMeter = metrics.NewMeter("eth/downloader/states/in")
  43. stateReqTimer = metrics.NewTimer("eth/downloader/states/req")
  44. stateDropMeter = metrics.NewMeter("eth/downloader/states/drop")
  45. stateTimeoutMeter = metrics.NewMeter("eth/downloader/states/timeout")
  46. )