Skip to content

Conversation

DieMyst
Copy link
Contributor

@DieMyst DieMyst commented Nov 7, 2024

No description provided.

@DieMyst DieMyst requested a review from folex November 7, 2024 07:45
@DieMyst DieMyst closed this Nov 7, 2024
@DieMyst DieMyst reopened this Nov 7, 2024
@DieMyst DieMyst marked this pull request as draft November 7, 2024 08:07
@DieMyst DieMyst marked this pull request as ready for review November 7, 2024 08:32
Comment on lines +318 to +325
query {
active_peers:peers(where: {and: [{currentCapacityCommitment_:{status:Active}}, {provider_: {approved: true}}]}) {
computeUnitsTotal
},
peers_total:peers(where: {and: [{provider_: {approved: true}}]}) {
computeUnitsTotal
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably can do just one peers(), and ask for CC status instead of computeUnitsTotal.

Then you can count Active in Python. This way, it would be less load on the Indexer, and less data over the wire.

Comment on lines +50 to +51
ACTIVE_PEERS = Gauge("fluence_active_peers_count", "Total count of peers in active CCs", registry=registry)
PEERS_TOTAL = Gauge("fluence_peers_total_count", "Total count of peers", registry=registry)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ACTIVE_PEERS = Gauge("fluence_active_peers_count", "Total count of peers in active CCs", registry=registry)
PEERS_TOTAL = Gauge("fluence_peers_total_count", "Total count of peers", registry=registry)
ACTIVE_PEERS = Gauge("fluence_active_peer_count", "Total count of peers in active CCs", registry=registry)
PEERS_TOTAL = Gauge("fluence_total_peer_count", "Total count of peers", registry=registry)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants