cc-backend/api/schema.graphqls

284 lines
6.0 KiB
GraphQL
Raw Normal View History

2021-12-17 15:49:22 +01:00
scalar Time
scalar Any
2021-12-17 15:49:22 +01:00
scalar NullableFloat
scalar MetricScope
scalar JobState
type Job {
2021-12-17 15:49:22 +01:00
id: ID!
jobId: Int!
user: String!
project: String!
jobName: String
2021-12-17 15:49:22 +01:00
cluster: String!
subCluster: String!
2021-12-17 15:49:22 +01:00
startTime: Time!
duration: Int!
walltime: Int!
2021-12-17 15:49:22 +01:00
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!]!
2022-01-07 09:44:34 +01:00
resources: [Resource!]!
2022-03-15 11:04:54 +01:00
metaData: Any
userData: User
}
2021-12-17 15:49:22 +01:00
type Cluster {
name: String!
2022-03-14 10:24:27 +01:00
partitions: [String!]! # Slurm partitions
2021-12-17 15:49:22 +01:00
metricConfig: [MetricConfig!]!
2022-03-14 10:24:27 +01:00
subClusters: [SubCluster!]! # Hardware partitions/subclusters
}
type SubCluster {
2021-12-17 15:49:22 +01:00
name: String!
nodes: String!
numberOfNodes: Int!
2021-12-17 15:49:22 +01:00
processorType: String!
socketsPerNode: Int!
coresPerSocket: Int!
threadsPerCore: Int!
flopRateScalar: MetricValue!
flopRateSimd: MetricValue!
memoryBandwidth: MetricValue!
2021-12-17 15:49:22 +01:00
topology: Topology!
2021-10-26 10:22:02 +02:00
}
type MetricValue {
unit: Unit!
value: Float!
}
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
}
2022-05-12 09:20:38 +02:00
type SubClusterConfig {
name: String!
peak: Float
normal: Float
caution: Float
alert: Float
remove: Boolean
2022-05-12 09:20:38 +02:00
}
2021-12-17 15:49:22 +01:00
type MetricConfig {
name: String!
unit: Unit!
scope: MetricScope!
aggregation: String!
timestep: Int!
2023-03-20 16:27:36 +01:00
peak: Float!
normal: Float
2023-03-20 16:27:36 +01:00
caution: Float!
alert: Float!
subClusters: [SubClusterConfig!]!
2021-12-17 15:49:22 +01:00
}
type Tag {
id: ID!
type: String!
name: String!
2021-04-22 15:00:54 +02:00
}
2022-01-07 09:44:34 +01:00
type Resource {
2021-12-17 15:49:22 +01:00
hostname: String!
hwthreads: [Int!]
2022-05-04 09:22:55 +02:00
accelerators: [String!]
2021-12-17 15:49:22 +01:00
configuration: String
}
type JobMetricWithName {
2021-12-20 10:48:58 +01:00
name: String!
2023-03-24 14:43:37 +01:00
scope: MetricScope!
2021-12-20 10:48:58 +01:00
metric: JobMetric!
2021-04-22 15:00:54 +02:00
}
2021-04-07 09:19:21 +02:00
type JobMetric {
unit: Unit
2021-12-17 15:49:22 +01:00
timestep: Int!
2022-01-07 09:44:34 +01:00
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: String
2021-12-17 15:49:22 +01:00
statistics: MetricStatistics
data: [NullableFloat!]!
2021-04-07 09:19:21 +02:00
}
type Unit {
base: String!
prefix: String
}
2021-12-17 15:49:22 +01:00
type MetricStatistics {
2022-01-27 09:29:53 +01:00
avg: Float!
min: Float!
max: Float!
2021-04-07 09:19:21 +02:00
}
2021-12-17 15:49:22 +01:00
type StatsSeries {
2022-01-07 09:44:34 +01:00
mean: [NullableFloat!]!
min: [NullableFloat!]!
max: [NullableFloat!]!
2021-04-14 18:53:18 +02:00
}
2021-10-26 10:22:02 +02:00
type MetricFootprints {
metric: String!
data: [NullableFloat!]!
}
type Footprints {
nodehours: [NullableFloat!]!
metrics: [MetricFootprints!]!
2021-10-26 10:22:02 +02:00
}
enum Aggregate { USER, PROJECT, CLUSTER }
2022-03-25 10:20:33 +01:00
enum Weights { NODE_COUNT, NODE_HOURS }
2021-10-26 10:22:02 +02:00
2021-12-09 16:25:48 +01:00
type NodeMetrics {
host: String!
subCluster: String!
metrics: [JobMetricWithName!]!
2021-12-09 16:25:48 +01:00
}
2022-02-19 10:28:29 +01:00
type Count {
name: String!
count: Int!
}
2022-03-15 11:04:54 +01:00
type User {
username: String!
name: String!
email: String!
}
type Query {
2021-10-26 10:22:02 +02:00
clusters: [Cluster!]! # List of all clusters
tags: [Tag!]! # List of all tags
2021-10-26 10:22:02 +02:00
2022-03-15 11:04:54 +01:00
user(username: String!): User
2022-03-24 16:08:47 +01:00
allocatedNodes(cluster: String!): [Count!]!
2022-03-15 11:04:54 +01:00
2021-10-26 10:22:02 +02:00
job(id: ID!): Job
2021-12-20 10:48:58 +01:00
jobMetrics(id: ID!, metrics: [String!], scopes: [MetricScope!]): [JobMetricWithName!]!
jobsFootprints(filter: [JobFilter!], metrics: [String!]!): Footprints
2021-10-26 10:22:02 +02:00
jobs(filter: [JobFilter!], page: PageRequest, order: OrderByInput): JobResultList!
jobsStatistics(filter: [JobFilter!], groupBy: Aggregate): [JobsStatistics!]!
2022-03-25 10:20:33 +01:00
jobsCount(filter: [JobFilter]!, groupBy: Aggregate!, weight: Weights, limit: Int): [Count!]!
2021-10-26 10:22:02 +02:00
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: String!, nodes: [String!], scopes: [MetricScope!], 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
input JobFilter {
2021-10-26 10:22:02 +02:00
tags: [ID!]
jobId: StringInput
2022-01-27 10:40:48 +01:00
arrayJobId: Int
user: StringInput
project: StringInput
jobName: StringInput
cluster: StringInput
2022-01-27 10:40:48 +01:00
partition: StringInput
2021-10-26 10:22:02 +02:00
duration: IntRange
2022-03-02 10:48:52 +01:00
minRunningFor: Int
numNodes: IntRange
numAccelerators: IntRange
numHWThreads: IntRange
2021-10-26 10:22:02 +02:00
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
in: [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
name: String # if User-Statistics: Given Name of Account (ID) Owner
2021-10-26 10:22:02 +02:00
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
histDuration: [HistoPoint!]! # value: hour, count: number of jobs with a rounded duration of value
2021-10-26 10:22:02 +02:00
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!
}