Merge "Add traffic duration support in test case" into stable/gambia
[yardstick.git] / samples / lmbench.yaml
1 ##############################################################################
2 # Copyright (c) 2017 kristian.hunt@gmail.com and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 ---
10 # Sample benchmark task config file
11 # measure memory read latency and memory bandwidth using lmbench
12 # can be used both on Openstack and Kubernetes with "context_type"
13
14 {% set context_type = context_type or "Heat" %}
15 {% set separator = separator or "." %}
16 {% if context_type == "Kubernetes" %}
17 {% set separator = "-" %}
18 {% endif %}
19
20 schema: "yardstick:task:0.1"
21
22 scenarios:
23 -
24   type: Lmbench
25   options:
26     test_type: "latency"
27     stop_size: 32.0
28
29   host: demeter{{ separator }}demo
30
31   runner:
32     type: Arithmetic
33     iterators:
34     -
35       name: stride
36       start: 64
37       stop: 128
38       step: 64
39
40   sla:
41     max_latency: 35
42     action: monitor
43 -
44   type: Lmbench
45   options:
46     test_type: "bandwidth"
47     benchmark: "wr"
48
49   host: demeter{{ separator }}demo
50
51   runner:
52     type: Arithmetic
53     iterators:
54     -
55       name: size
56       start: 500
57       stop: 2000
58       step: 500
59
60   sla:
61     min_bandwidth: 10000
62     action: monitor
63
64 context:
65   type: {{ context_type }}
66   name: demo
67   {% if context_type == "Kubernetes" %}
68   servers:
69     demeter:
70       image: opnfv/yardstick-image-k8s
71       resources:
72         limits:
73           cpu: 1
74           memory: 1Gi
75         requests:
76           cpu: 1
77           memory: 1Gi
78       command: /bin/bash
79       args: ['-c', 'mkdir /root/.ssh; cp /tmp/.ssh/authorized_keys ~/.ssh/.;
80                     chmod 700 ~/.ssh; chmod 600 ~/.ssh/*; service ssh restart;
81                     while true ; do sleep 10000; done']
82   {% else %}
83   image: yardstick-image
84   flavor: yardstick-flavor
85   user: ubuntu
86
87   placement_groups:
88     pgrp1:
89       policy: "availability"
90
91   servers:
92     demeter:
93       floating_ip: true
94       placement: "pgrp1"
95
96   networks:
97     test:
98       cidr: "10.0.1.0/24"
99   {% endif %}