-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[resotocore][feat] Maintain checks and benchmarks and allow custom ch…
…ecks and benchmarks (#1873)
- Loading branch information
1 parent
2a6aa16
commit 1e6110f
Showing
17 changed files
with
657 additions
and
408 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
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,17 @@ | ||
from resotocore.db.async_arangodb import AsyncArangoDB | ||
from resotocore.db.entitydb import EntityDb, ArangoEntityDb, EventEntityDb | ||
from resotocore.report import ReportCheck, Benchmark | ||
|
||
ReportCheckDb = EntityDb[str, ReportCheck] | ||
EventReportCheckDb = EventEntityDb[str, ReportCheck] | ||
|
||
BenchmarkDb = EntityDb[str, Benchmark] | ||
EventBenchmarkDb = EventEntityDb[str, Benchmark] | ||
|
||
|
||
def report_check_db(db: AsyncArangoDB, collection: str) -> ArangoEntityDb[str, ReportCheck]: | ||
return ArangoEntityDb(db, collection, ReportCheck, lambda k: k.id) | ||
|
||
|
||
def benchmark_db(db: AsyncArangoDB, collection: str) -> ArangoEntityDb[str, Benchmark]: | ||
return ArangoEntityDb(db, collection, Benchmark, lambda k: k.id) |
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
Oops, something went wrong.