diff --git a/config.go b/config.go index 912cf50..2c0b443 100644 --- a/config.go +++ b/config.go @@ -17,7 +17,6 @@ package robot import ( - "github.com/CortexFoundation/CortexTheseus/metrics" "time" ) @@ -26,10 +25,3 @@ const ( delay = 12 //params.Delay timeout = 30 * time.Second ) - -var ( - rpcBlockMeter = metrics.NewRegisteredMeter("torrent/block/call", nil) - rpcCurrentMeter = metrics.NewRegisteredMeter("torrent/current/call", nil) - rpcUploadMeter = metrics.NewRegisteredMeter("torrent/upload/call", nil) - rpcReceiptMeter = metrics.NewRegisteredMeter("torrent/receipt/call", nil) -) diff --git a/metrics.go b/metrics.go new file mode 100644 index 0000000..7f2219f --- /dev/null +++ b/metrics.go @@ -0,0 +1,28 @@ +// Copyright 2023 The CortexTheseus Authors +// This file is part of the CortexTheseus library. +// +// The CortexTheseus library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The CortexTheseus library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the CortexTheseus library. If not, see . + +package robot + +import ( + "github.com/CortexFoundation/CortexTheseus/metrics" +) + +var ( + rpcBlockMeter = metrics.NewRegisteredMeter("torrent/block/call", nil) + rpcCurrentMeter = metrics.NewRegisteredMeter("torrent/current/call", nil) + rpcUploadMeter = metrics.NewRegisteredMeter("torrent/upload/call", nil) + rpcReceiptMeter = metrics.NewRegisteredMeter("torrent/receipt/call", nil) +)