Closed
Description
It would be useful to measure how much work a subgraph actually causes, e.g., so that we can make decisions on how to balance indexing of subgraphs across different graph-node instances.
To start, we should, for each block, look at the time that a subgraph spends running handlers plus the time it takes to store entities in the database as the cost for each block, and then compute a longer-term average using exponential decay, i.e. if the cost for one block is b_i
, make the subgraph cost sum_{i=0}^n c^(n-i) * b_i
for some c < 1
; that measure would be easy to compute on a running basis, and the choice of c
would determine over how many blocks we average the cost.