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
ui/lib/api

View file

@ -99,6 +99,21 @@ type Torrent {
excludedFiles: [TorrentFile!]! @resolver
peers: [TorrentPeer!]! @resolver
}
type TorrentClientStats {
bytesWritten: Int!
bytesWrittenData: Int!
bytesRead: Int!
bytesReadData: Int!
bytesReadUsefulData: Int!
bytesReadUsefulIntendedData: Int!
chunksWritten: Int!
chunksRead: Int!
chunksReadUseful: Int!
chunksReadWasted: Int!
metadataChunksRead: Int!
piecesDirtiedGood: Int!
piecesDirtiedBad: Int!
}
type TorrentDaemonMutation {
validateTorrent(filter: TorrentFilter!): Boolean! @resolver
setTorrentPriority(infohash: String!, file: String, priority: TorrentPriority!): Boolean! @resolver
@ -106,7 +121,8 @@ type TorrentDaemonMutation {
}
type TorrentDaemonQuery {
torrents(filter: TorrentsFilter): [Torrent!]! @resolver
stats: TorrentStats! @resolver
clientStats: TorrentClientStats! @resolver
statsHistory(since: DateTime!, infohash: String): [TorrentStats!]! @resolver
}
type TorrentFS implements Dir & FsEntry {
name: String!
@ -156,19 +172,12 @@ type TorrentProgress implements Progress {
total: Int!
}
type TorrentStats {
bytesWritten: Int!
bytesWrittenData: Int!
bytesRead: Int!
bytesReadData: Int!
bytesReadUsefulData: Int!
bytesReadUsefulIntendedData: Int!
chunksWritten: Int!
chunksRead: Int!
chunksReadUseful: Int!
chunksReadWasted: Int!
metadataChunksRead: Int!
piecesDirtiedGood: Int!
piecesDirtiedBad: Int!
timestamp: DateTime!
downloadedBytes: UInt!
uploadedBytes: UInt!
totalPeers: UInt!
activePeers: UInt!
connectedSeeders: UInt!
}
input TorrentsFilter {
infohash: StringFilter
@ -178,4 +187,5 @@ input TorrentsFilter {
peersCount: IntFilter
priority: TorrentPriorityFilter
}
scalar UInt
scalar Upload