-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: remaining activity based code metrics (#2112)
* add: remaining activity based code metrics * add: gas fees and transactions * fix: from_id to null and add active addresses
- Loading branch information
Showing
10 changed files
with
145 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
select STR_TO_DATE(@end_ds, '%Y-%m-%d') as metrics_bucket_date, | ||
events.event_source, | ||
events.to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name as metric, | ||
COUNT(distinct events.from_artifact_id) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where event_type in ('CONTRACT_INVOCATION_SUCCESS_DAILY_COUNT') | ||
and events.bucket_day BETWEEN STR_TO_DATE(@start_ds, '%Y-%m-%d') AND STR_TO_DATE(@end_ds, '%Y-%m-%d') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
select STR_TO_DATE(@end_ds, '%Y-%m-%d') as metrics_bucket_date, | ||
events.event_source, | ||
events.to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name as metric, | ||
SUM(events.amount) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where event_type in ('COMMIT_CODE') | ||
and events.bucket_day BETWEEN STR_TO_DATE(@start_ds, '%Y-%m-%d') AND STR_TO_DATE(@end_ds, '%Y-%m-%d') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
select STR_TO_DATE(@end_ds, '%Y-%m-%d') as metrics_bucket_date, | ||
events.event_source, | ||
events.to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name as metric, | ||
SUM(events.amount) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where event_type in ('CONTRACT_INVOCATION_DAILY_L2_GAS_USED') | ||
and events.bucket_day BETWEEN STR_TO_DATE(@start_ds, '%Y-%m-%d') AND STR_TO_DATE(@end_ds, '%Y-%m-%d') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
select STR_TO_DATE(@end_ds, '%Y-%m-%d') as metrics_bucket_date, | ||
events.event_source, | ||
events.to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name as metric, | ||
SUM(events.amount) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where event_type in ('ISSUE_CLOSED') | ||
and events.bucket_day BETWEEN STR_TO_DATE(@start_ds, '%Y-%m-%d') AND STR_TO_DATE(@end_ds, '%Y-%m-%d') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
select STR_TO_DATE(@end_ds, '%Y-%m-%d') as metrics_bucket_date, | ||
events.event_source, | ||
events.to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name as metric, | ||
SUM(events.amount) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where event_type in ('ISSUE_OPENED') | ||
and events.bucket_day BETWEEN STR_TO_DATE(@start_ds, '%Y-%m-%d') AND STR_TO_DATE(@end_ds, '%Y-%m-%d') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
select STR_TO_DATE(@end_ds, '%Y-%m-%d') as metrics_bucket_date, | ||
events.event_source, | ||
events.to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name as metric, | ||
SUM(events.amount) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where event_type in ('PULL_REQUEST_MERGED') | ||
and events.bucket_day BETWEEN STR_TO_DATE(@start_ds, '%Y-%m-%d') AND STR_TO_DATE(@end_ds, '%Y-%m-%d') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
select STR_TO_DATE(@end_ds, '%Y-%m-%d') as metrics_bucket_date, | ||
events.event_source, | ||
events.to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name as metric, | ||
SUM(events.amount) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where event_type in ('PULL_REQUEST_OPENED') | ||
and events.bucket_day BETWEEN STR_TO_DATE(@start_ds, '%Y-%m-%d') AND STR_TO_DATE(@end_ds, '%Y-%m-%d') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
to_artifact_id, | ||
event_source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
select STR_TO_DATE(@end_ds, '%Y-%m-%d') as metrics_bucket_date, | ||
events.event_source, | ||
events.to_artifact_id, | ||
'' as from_artifact_id, | ||
@metric_name as metric, | ||
SUM(events.amount) as amount | ||
from metrics.events_daily_to_artifact as events | ||
where event_type in ('CONTRACT_INVOCATION_SUCCESS_DAILY_COUNT') | ||
and events.bucket_day BETWEEN STR_TO_DATE(@start_ds, '%Y-%m-%d') AND STR_TO_DATE(@end_ds, '%Y-%m-%d') | ||
group by 1, | ||
metric, | ||
from_artifact_id, | ||
to_artifact_id, | ||
event_source |