@@ -162,18 +162,6 @@ export const createEffects = async (ctx) => {
162162
163163 const gauge = MetricsClient . gaugeWith ( { } )
164164
165- const evaluationCounter = MetricsClient . counterWith ( { } ) ( {
166- name : 'ao_process_total_evaluations' ,
167- description : 'The total number of evaluations on a CU' ,
168- labelNames : [ 'stream_type' , 'message_type' , 'process_error' ]
169- } )
170-
171- const gatewayCounter = MetricsClient . counterWith ( { } ) ( {
172- name : 'ao_process_total_graphql_queries' ,
173- description : 'The total number of GraphQL queries on a CU' ,
174- labelNames : [ 'query_name' , 'result' ]
175- } )
176-
177165 const readProcessMemoryFile = AoProcessClient . readProcessMemoryFileWith ( {
178166 DIR : ctx . PROCESS_MEMORY_CACHE_FILE_DIR ,
179167 readFile
@@ -228,7 +216,6 @@ export const createEffects = async (ctx) => {
228216 const saveCheckpoint = AoProcessClient . saveCheckpointWith ( {
229217 address,
230218 readProcessMemoryFile,
231- gatewayCounter,
232219 queryGateway : ArweaveClient . queryGatewayWith ( { fetch : ctx . fetch , GRAPHQL_URL : ctx . GRAPHQL_URL , logger : ctx . logger } ) ,
233220 queryCheckpointGateway : ArweaveClient . queryGatewayWith ( { fetch : ctx . fetch , GRAPHQL_URL : ctx . CHECKPOINT_GRAPHQL_URL , logger : ctx . logger } ) ,
234221 hashWasmMemory : WasmClient . hashWasmMemoryWith ( { logger : ctx . logger } ) ,
@@ -294,6 +281,12 @@ export const createEffects = async (ctx) => {
294281 const loadMemoryUsage = ( ) => process . memoryUsage ( )
295282 const loadProcessCacheUsage = ( ) => wasmMemoryCache . data . loadProcessCacheUsage ( )
296283
284+ const evaluationCounter = MetricsClient . counterWith ( { } ) ( {
285+ name : 'ao_process_total_evaluations' ,
286+ description : 'The total number of evaluations on a CU' ,
287+ labelNames : [ 'stream_type' , 'message_type' , 'process_error' ]
288+ } )
289+
297290 /**
298291 * TODO: Gas can grow to a huge number. We need to make sure this doesn't crash when that happens
299292 */
@@ -306,7 +299,7 @@ export const createEffects = async (ctx) => {
306299 const BLOCK_GRAPHQL_ARRAY = ctx . GRAPHQL_URLS . length > 0 ? ctx . GRAPHQL_URLS : [ ctx . GRAPHQL_URL ]
307300
308301 const common = ( logger ) => ( {
309- loadTransactionMeta : ArweaveClient . loadTransactionMetaWith ( { fetch : ctx . fetch , gatewayCounter , GRAPHQL_URL : ctx . GRAPHQL_URL , logger } ) ,
302+ loadTransactionMeta : ArweaveClient . loadTransactionMetaWith ( { fetch : ctx . fetch , GRAPHQL_URL : ctx . GRAPHQL_URL , logger } ) ,
310303 loadTransactionData : ArweaveClient . loadTransactionDataWith ( { fetch : ctx . fetch , ARWEAVE_URL : ctx . ARWEAVE_URL , logger } ) ,
311304 isProcessOwnerSupported : AoProcessClient . isProcessOwnerSupportedWith ( { ALLOW_OWNERS : ctx . ALLOW_OWNERS } ) ,
312305 findProcess : AoProcessClient . findProcessWith ( { db, logger } ) ,
@@ -318,7 +311,6 @@ export const createEffects = async (ctx) => {
318311 findFileCheckpointBefore : AoProcessClient . findFileCheckpointBeforeWith ( { db } ) ,
319312 findRecordCheckpointBefore : AoProcessClient . findRecordCheckpointBeforeWith ( { db } ) ,
320313 address,
321- gatewayCounter,
322314 queryGateway : ArweaveClient . queryGatewayWith ( { fetch : ctx . fetch , GRAPHQL_URL : ctx . GRAPHQL_URL , logger } ) ,
323315 queryCheckpointGateway : ArweaveClient . queryGatewayWith ( { fetch : ctx . fetch , GRAPHQL_URL : ctx . CHECKPOINT_GRAPHQL_URL , logger } ) ,
324316 PROCESS_IGNORE_ARWEAVE_CHECKPOINTS : ctx . PROCESS_IGNORE_ARWEAVE_CHECKPOINTS ,
@@ -338,14 +330,12 @@ export const createEffects = async (ctx) => {
338330 logger
339331 } ) ,
340332 evaluationCounter,
341- gatewayCounter,
342333 // gasCounter,
343334 saveProcess : AoProcessClient . saveProcessWith ( { db, logger } ) ,
344335 findEvaluation : AoEvaluationClient . findEvaluationWith ( { db, logger } ) ,
345336 saveEvaluation : AoEvaluationClient . saveEvaluationWith ( { db, logger } ) ,
346337 findBlocks : AoBlockClient . findBlocksWith ( { db, logger } ) ,
347338 saveBlocks : AoBlockClient . saveBlocksWith ( { db, logger } ) ,
348- getLatestBlock : AoBlockClient . getLatestBlockWith ( { ARWEAVE_URL : ctx . ARWEAVE_URL } ) ,
349339 loadBlocksMeta : AoBlockClient . loadBlocksMetaWith ( { fetch : ctx . fetch , GRAPHQL_URLS : BLOCK_GRAPHQL_ARRAY , pageSize : 90 , logger } ) ,
350340 findModule : AoModuleClient . findModuleWith ( { db, logger } ) ,
351341 saveModule : AoModuleClient . saveModuleWith ( { db, logger } ) ,
@@ -376,7 +366,6 @@ export const createEffects = async (ctx) => {
376366 loadTimestamp : AoSuClient . loadTimestampWith ( { fetch : ctx . fetch , logger } ) ,
377367 loadProcess : AoSuClient . loadProcessWith ( { fetch : ctx . fetch , logger } ) ,
378368 loadMessages : AoSuClient . loadMessagesWith ( {
379- gatewayCounter,
380369 hashChain : ( ...args ) => hashChainWorker . exec ( 'hashChain' , args ) ,
381370 fetch : ctx . fetch ,
382371 pageSize : 1000 ,
0 commit comments