cc-backend/graph/schema.graphqls

236 lines
5.0 KiB
GraphQL
Raw Normal View History

2021-12-17 15:49:22 +01:00
scalar Time
scalar NullableFloat
scalar MetricScope
scalar JobState
type Job {
2021-12-17 15:49:22 +01:00
id: ID!
jobId: Int!
user: String!
project: String!
cluster: String!
startTime: Time!
duration: Int!
numNodes: Int!
numHWThreads: Int!
numAcc: Int!
SMT: Int!
2021-12-17 15:49:22 +01:00
exclusive: Int!
partition: String!
arrayJobId: Int!
monitoringStatus: Int!
state: JobState!
tags: [Tag!]!
resources: [JobResource!]!
}
2021-12-17 15:49:22 +01:00
type Cluster {
name: String!
metricConfig: [MetricConfig!]!
filterRanges: FilterRanges!
partitions: [Partition!]!
}
2021-12-17 15:49:22 +01:00
type Partition {
name: String!
processorType: String!
socketsPerNode: Int!
coresPerSocket: Int!
threadsPerCore: Int!
flopRateScalar: Int!
flopRateSimd: Int!
memoryBandwidth: Int!
topology: Topology!
2021-10-26 10:22:02 +02:00
}
2021-12-17 15:49:22 +01:00
type Topology {
node: [Int!]
socket: [[Int!]!]
memoryDomain: [[Int!]!]
die: [[Int!]!]
core: [[Int!]!]
accelerators: [Accelerator!]
2021-09-23 11:45:20 +02:00
}
2021-04-21 10:12:19 +02:00
2021-12-17 15:49:22 +01:00
type Accelerator {
id: String!
type: String!
model: String!
2021-04-07 09:19:21 +02:00
}
2021-12-17 15:49:22 +01:00
type MetricConfig {
name: String!
unit: String!
scope: String!
timestep: Int!
Peak: Float!
Normal: Float!
Caution: Float!
Alert: Float!
}
type Tag {
id: ID!
type: String!
name: String!
2021-04-22 15:00:54 +02:00
}
2021-12-17 15:49:22 +01:00
type JobResource {
hostname: String!
hwthreads: [Int!]
accelerators: [Int!]
configuration: String
}
type JobMetricWithName {
name: String!
node: JobMetric
socket: JobMetric
memoryDomain: JobMetric
core: JobMetric
hwthread: JobMetric
2021-04-22 15:00:54 +02:00
}
2021-04-07 09:19:21 +02:00
type JobMetric {
2021-12-17 15:49:22 +01:00
unit: String!
scope: MetricScope!
timestep: Int!
series: [Series!]!
statisticsSeries: [StatsSeries!]
2021-04-07 09:19:21 +02:00
}
2021-12-17 15:49:22 +01:00
type Series {
hostname: String!
id: Int
statistics: MetricStatistics
data: [NullableFloat!]!
2021-04-07 09:19:21 +02:00
}
2021-12-17 15:49:22 +01:00
type MetricStatistics {
avg: Float!
min: Float!
max: Float!
2021-04-07 09:19:21 +02:00
}
2021-12-17 15:49:22 +01:00
type StatsSeries {
mean: [NullableFloat!]
min: [NullableFloat!]
max: [NullableFloat!]
2021-04-14 18:53:18 +02:00
}
2021-10-26 10:22:02 +02:00
type MetricFootprints {
name: String!
footprints: [NullableFloat!]!
}
enum Aggregate { USER, PROJECT, CLUSTER }
2021-12-09 16:25:48 +01:00
type NodeMetric {
name: String!
data: [NullableFloat!]!
}
type NodeMetrics {
id: String!
metrics: [NodeMetric!]!
}
type Query {
2021-10-26 10:22:02 +02:00
clusters: [Cluster!]! # List of all clusters
2021-12-17 15:49:22 +01:00
tags: [Tag!]! # List of all tags
2021-10-26 10:22:02 +02:00
job(id: ID!): Job
jobMetrics(id: ID!, metrics: [String!]): [JobMetricWithName!]!
jobsFootprints(filter: [JobFilter!], metrics: [String!]!): [MetricFootprints]!
jobs(filter: [JobFilter!], page: PageRequest, order: OrderByInput): JobResultList!
jobsStatistics(filter: [JobFilter!], groupBy: Aggregate): [JobsStatistics!]!
rooflineHeatmap(filter: [JobFilter!]!, rows: Int!, cols: Int!, minX: Float!, minY: Float!, maxX: Float!, maxY: Float!): [[Float!]!]!
2021-12-09 16:25:48 +01:00
nodeMetrics(cluster: ID!, nodes: [String!], metrics: [String!], from: Time!, to: Time!): [NodeMetrics!]!
}
2021-05-21 09:30:15 +02:00
type Mutation {
2021-12-17 15:49:22 +01:00
createTag(type: String!, name: String!): Tag!
2021-05-21 09:30:15 +02:00
deleteTag(id: ID!): ID!
2021-12-17 15:49:22 +01:00
addTagsToJob(job: ID!, tagIds: [ID!]!): [Tag!]!
removeTagsFromJob(job: ID!, tagIds: [ID!]!): [Tag!]!
2021-09-23 11:45:20 +02:00
updateConfiguration(name: String!, value: String!): String
}
2021-12-17 15:49:22 +01:00
type IntRangeOutput { from: Int!, to: Int! }
type TimeRangeOutput { from: Time!, to: Time! }
2021-09-23 11:45:20 +02:00
type FilterRanges {
2021-10-26 10:22:02 +02:00
duration: IntRangeOutput!
numNodes: IntRangeOutput!
2021-09-23 11:45:20 +02:00
startTime: TimeRangeOutput!
2021-05-21 09:30:15 +02:00
}
input JobFilter {
2021-10-26 10:22:02 +02:00
tags: [ID!]
jobId: StringInput
user: StringInput
project: StringInput
cluster: StringInput
2021-10-26 10:22:02 +02:00
duration: IntRange
numNodes: IntRange
startTime: TimeRange
2021-12-17 15:49:22 +01:00
state: [JobState!]
flopsAnyAvg: FloatRange
2021-10-26 10:22:02 +02:00
memBwAvg: FloatRange
loadAvg: FloatRange
memUsedMax: FloatRange
}
input OrderByInput {
field: String!
2021-10-26 10:22:02 +02:00
order: SortDirectionEnum! = ASC
}
enum SortDirectionEnum {
DESC
ASC
}
input StringInput {
2021-10-26 10:22:02 +02:00
eq: String
contains: String
startsWith: String
2021-10-26 10:22:02 +02:00
endsWith: String
}
2021-12-17 15:49:22 +01:00
input IntRange { from: Int!, to: Int! }
input FloatRange { from: Float!, to: Float! }
input TimeRange { from: Time, to: Time }
type JobResultList {
2021-10-26 10:22:02 +02:00
items: [Job!]!
offset: Int
2021-10-26 10:22:02 +02:00
limit: Int
count: Int
}
type HistoPoint {
count: Int!
value: Int!
}
type JobsStatistics {
2021-10-26 10:22:02 +02:00
id: ID! # If `groupBy` was used, ID of the user/project/cluster
totalJobs: Int! # Number of jobs that matched
shortJobs: Int! # Number of jobs with a duration of less than 2 minutes
totalWalltime: Int! # Sum of the duration of all matched jobs in hours
totalCoreHours: Int! # Sum of the core hours of all matched jobs
histWalltime: [HistoPoint!]! # value: hour, count: number of jobs with a rounded duration of value
histNumNodes: [HistoPoint!]! # value: number of nodes, count: number of jobs with that number of nodes
2021-09-23 11:45:20 +02:00
}
input PageRequest {
2021-09-23 11:45:20 +02:00
itemsPerPage: Int!
2021-10-26 10:22:02 +02:00
page: Int!
}