Skip to content

Commit

Permalink
Merge pull request #16 from waku-org/feat/batched-metrics
Browse files Browse the repository at this point in the history
feat: add endpoint for batching different metrics in single request
  • Loading branch information
adklempner authored Jun 13, 2024
2 parents 1ca9526 + a19ec01 commit 8fe3616
Show file tree
Hide file tree
Showing 8 changed files with 331 additions and 69 deletions.
5 changes: 5 additions & 0 deletions telemetry/aggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ func dropTables(db *sql.DB) {
log.Fatalf("an error '%s' was not expected when dropping the table", err)
}

_, err = db.Exec("DROP TABLE IF EXISTS sentEnvelopes")
if err != nil {
log.Fatalf("an error '%s' was not expected when dropping the table", err)
}

_, err = db.Exec("DROP TABLE IF EXISTS protocolStatsRate")
if err != nil {
log.Fatalf("an error '%s' was not expected when dropping the table", err)
Expand Down
201 changes: 139 additions & 62 deletions telemetry/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions telemetry/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ func createTables(db *sql.DB) error {
sentAt INTEGER NOT NULL,
topic VARCHAR(255) NOT NULL,
createdAt INTEGER NOT NULL,
constraint receivedMessages_unique unique(chatId, messageHash, receiverKeyUID, nodeName)
);`
_, err := db.Exec(sqlStmt)

Expand Down
Loading

0 comments on commit 8fe3616

Please sign in to comment.