Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ftocal authored and marianososto committed Mar 8, 2024
1 parent 8adec9f commit 10778c5
Showing 1 changed file with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,25 @@ return union(tables:[totalMessages,totalValueTransferred])



ts1h = date.truncate(t: now(), unit: 1h)
ts1d = date.truncate(t: now(), unit: 1d)
ts = date.truncate(t: now(), unit: 1d)
bucketInfinite = "wormscan"
bucket30d = "wormscan-30days"

cfg1h = {
sourceBucket:bucketInfinite,
destBucket:bucket30d,
destMeasurement:"core_protocols_stats_1h",
since: date.sub(d: 1h, from: ts1h),
ts:ts1h,
}

cfg1d = {
cfg = {
sourceBucket:bucketInfinite,
destBucket:bucketInfinite,
destMeasurement:"core_protocols_stats_1d",
since: date.sub(d: 1d, from: ts1d),
ts:ts1d,
since: date.sub(d: 1d, from: ts),
ts:ts,
}

// Set this variable with the cfg of the desired task
taskCfg = cfg1d

option task = {
name: "cctp and portal_token_bridge metrics every day",
every: 1d,
}

calculateProtocolStats(protocol:"CCTP_WORMHOLE_INTEGRATION",protocolVersion:"v1",taskCfg:taskCfg)
calculateProtocolStats(protocol:"CCTP_WORMHOLE_INTEGRATION",protocolVersion:"v1",taskCfg:cfg)

calculateProtocolStats(protocol:"PORTAL_TOKEN_BRIDGE",protocolVersion:"v1",taskCfg:taskCfg)
calculateProtocolStats(protocol:"PORTAL_TOKEN_BRIDGE",protocolVersion:"v1",taskCfg:cfg)

0 comments on commit 10778c5

Please sign in to comment.