ax(mining): replace prose comment on PerformanceMetrics with usage example
AX-2 violation: comment restated the type name rather than showing a concrete usage example. Replaced with a call site example showing how to call GetStats and access the Hashrate field. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
28345a7d87
commit
b28d0bd12f
1 changed files with 2 additions and 1 deletions
|
|
@ -243,7 +243,8 @@ func isValidAlgo(algo string) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// PerformanceMetrics represents the performance metrics for a miner.
|
||||
// metrics, err := miner.GetStats(ctx)
|
||||
// if metrics.Hashrate > 0 { log.Printf("%.2f H/s", float64(metrics.Hashrate)) }
|
||||
type PerformanceMetrics struct {
|
||||
Hashrate int `json:"hashrate"`
|
||||
Shares int `json:"shares"`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue