mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 13:29:05 +01:00
155 lines
2.2 KiB
GraphQL
155 lines
2.2 KiB
GraphQL
type Job {
|
|
id: ID!
|
|
|
|
jobId: String!
|
|
userId: String!
|
|
projectId: String!
|
|
clusterId: String!
|
|
startTime: Time!
|
|
duration: Int!
|
|
numNodes: Int!
|
|
hasProfile: Boolean!
|
|
|
|
memUsed_max: Float
|
|
flopsAny_avg: Float
|
|
memBw_avg: Float
|
|
netBw_avg: Float
|
|
fileBw_avg: Float
|
|
}
|
|
|
|
type JobMetric {
|
|
unit: String!
|
|
scope: JobMetricScope!
|
|
timestep: Int!
|
|
series: [JobMetricSeries]!
|
|
}
|
|
|
|
enum JobMetricScope {
|
|
node
|
|
cpu
|
|
socket
|
|
}
|
|
|
|
type JobMetricSeries {
|
|
node_id: String!
|
|
statistics: JobMetricStatistics
|
|
data: [Float]!
|
|
}
|
|
|
|
type JobMetricStatistics {
|
|
avg: Float!
|
|
min: Float!
|
|
max: Float!
|
|
}
|
|
|
|
type Query {
|
|
jobById(jobId: String!): Job
|
|
jobs(filter: JobFilterList, page: PageRequest, order: OrderByInput): JobResultList!
|
|
jobsStatistics(filter: JobFilterList): JobsStatistics!
|
|
jobMetrics(jobId: String!, metrics: [String]): [JobMetricWithName]!
|
|
}
|
|
|
|
input StartJobInput {
|
|
jobId: String!
|
|
userId: String!
|
|
projectId: String!
|
|
clusterId: String!
|
|
startTime: Time!
|
|
numNodes: Int!
|
|
}
|
|
|
|
input StopJobInput {
|
|
stopTime: Time!
|
|
}
|
|
|
|
input AddJobInput {
|
|
jobId: String!
|
|
userId: String!
|
|
projectId: String!
|
|
clusterId: String!
|
|
startTime: Time!
|
|
duration: Int!
|
|
numNodes: Int!
|
|
}
|
|
|
|
|
|
input JobFilterList {
|
|
list: [JobFilter]
|
|
}
|
|
|
|
input JobFilter {
|
|
jobId: StringInput
|
|
userId: StringInput
|
|
projectId: StringInput
|
|
clusterId: StringInput
|
|
duration: IntRange
|
|
numNodes: IntRange
|
|
startTime: TimeRange
|
|
hasProfile: Boolean
|
|
}
|
|
|
|
input OrderByInput {
|
|
field: String!
|
|
order: SortDirectionEnum = ASC
|
|
}
|
|
|
|
enum SortDirectionEnum {
|
|
DESC
|
|
ASC
|
|
}
|
|
|
|
input StringInput {
|
|
eq: String
|
|
contains: String
|
|
startsWith: String
|
|
endsWith: String
|
|
}
|
|
|
|
input IntRange {
|
|
from: Int!
|
|
to: Int!
|
|
}
|
|
|
|
input FloatRange {
|
|
from: Float!
|
|
to: Float!
|
|
}
|
|
|
|
input TimeRange {
|
|
from: Time!
|
|
to: Time!
|
|
}
|
|
|
|
type JobResultList {
|
|
items: [Job]!
|
|
offset: Int
|
|
limit: Int
|
|
count: Int
|
|
}
|
|
|
|
type JobMetricWithName {
|
|
name: String!
|
|
metric: JobMetric!
|
|
}
|
|
|
|
type HistoPoint {
|
|
count: Int!
|
|
value: Int!
|
|
}
|
|
|
|
type JobsStatistics {
|
|
totalJobs: Int!
|
|
shortJobs: Int!
|
|
totalWalltime: Int!
|
|
totalCoreHours: Int!
|
|
histWalltime: [HistoPoint]!
|
|
histNumNodes: [HistoPoint]!
|
|
}
|
|
|
|
input PageRequest {
|
|
itemsPerPage: Int
|
|
page: Int
|
|
}
|
|
|
|
scalar Time
|