13111: Merge branch 'master' into 13111-webdav-projects
[arvados.git] / services / nodemanager / tests / stress_test.cwl
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4 #
5 #
6 # Usage: arvados-cwl-runner stress_test.cwl
7 #
8 # Submits 100 jobs or containers, creating load on node manager and
9 # scheduler.
10
11 class: Workflow
12 cwlVersion: v1.0
13 requirements:
14   ScatterFeatureRequirement: {}
15   InlineJavascriptRequirement: {}
16 inputs: []
17 outputs: []
18 steps:
19   step1:
20     in: []
21     out: [out]
22     run:
23       class: ExpressionTool
24       inputs: []
25       outputs:
26         out: int[]
27       expression: |
28         ${
29           var r = [];
30           for (var i = 1; i <= 100; i++) {
31             r.push(i);
32           }
33           return {out: r};
34         }
35   step2:
36     in:
37       num: step1/out
38     out: []
39     scatter: num
40     run:
41       class: CommandLineTool
42       requirements:
43         ShellCommandRequirement: {}
44       inputs:
45         num: int
46       outputs: []
47       arguments: [echo, "starting",
48         {shellQuote: false, valueFrom: "&&"},
49         sleep, $((101-inputs.num)*2),
50         {shellQuote: false, valueFrom: "&&"},
51         echo, "the number of the day is", $(inputs.num)]