-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
populate guild usage from deployment metrics
- Loading branch information
1 parent
98f56d1
commit 7b5686a
Showing
25 changed files
with
523 additions
and
129 deletions.
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
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
37 changes: 24 additions & 13 deletions
37
kite-service/internal/db/postgres/pgmodel/deployment_metrics.sql.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
105 changes: 105 additions & 0 deletions
105
kite-service/internal/db/postgres/pgmodel/guild_usage.sql.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,33 @@ | ||
-- name: UpdateGuildUsage :exec | ||
-- name: CreateGuildUsageEntry :exec | ||
INSERT INTO guild_usage ( | ||
guild_id, | ||
total_event_count, | ||
success_event_count, | ||
total_event_execution_time, | ||
avg_event_execution_time, | ||
total_event_total_time, | ||
avg_event_total_time, | ||
total_call_count, | ||
success_call_count, | ||
total_call_total_time, | ||
avg_call_total_time, | ||
period_starts_at, | ||
period_ends_at | ||
) VALUES ( | ||
$1, | ||
$2, | ||
$3, | ||
$4, | ||
$5, | ||
$6, | ||
$7, | ||
$8, | ||
$9, | ||
$10, | ||
$11, | ||
$12, | ||
$13 | ||
); | ||
|
||
-- name: GetLastGuildUsageEntry :one | ||
SELECT * FROM guild_usage WHERE guild_id = $1 ORDER BY period_ends_at DESC LIMIT 1; |
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
Oops, something went wrong.