torrent stats

This commit is contained in:
royalcat 2024-07-16 23:58:06 +03:00
parent d5aa78cb39
commit f9311284fc
16 changed files with 1541 additions and 987 deletions

View file

@ -5,6 +5,7 @@ directive @stream on FIELD_DEFINITION
scalar DateTime
scalar Upload
scalar UInt
type Schema {
query: Query

View file

@ -1,6 +1,7 @@
type TorrentDaemonQuery {
torrents(filter: TorrentsFilter): [Torrent!]! @resolver
stats: TorrentStats! @resolver
clientStats: TorrentClientStats! @resolver
statsHistory(since: DateTime!, infohash: String): [TorrentStats!]! @resolver
}
input TorrentsFilter {

View file

@ -33,7 +33,7 @@ enum TorrentPriority {
NOW
}
type TorrentStats {
type TorrentClientStats {
bytesWritten: Int!
bytesWrittenData: Int!
bytesRead: Int!
@ -51,3 +51,12 @@ type TorrentStats {
piecesDirtiedGood: Int!
piecesDirtiedBad: Int!
}
type TorrentStats {
timestamp: DateTime!
downloadedBytes: UInt!
uploadedBytes: UInt!
totalPeers: UInt!
activePeers: UInt!
connectedSeeders: UInt!
}