Skip to content

Commit 1a7d2cb

Browse files
author
Andrea Spacca
authored
add input and vars in rally scenario spec, make input and corpora man… (#653)
1 parent d13d1ed commit 1a7d2cb

File tree

8 files changed

+93
-20
lines changed

8 files changed

+93
-20
lines changed

spec/changelog.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
##
55
- version: 3.0.1-next
66
changes:
7+
- description: Fix spec for rally benchmark scenario
8+
type: bugfix
9+
link: https://github.com/elastic/package-spec/pull/653
710
- description: Using non-GA versions of the spec in GA packages produces a filterable validation error instead of a warning
811
type: enhancement
912
link: https://github.com/elastic/package-spec/pull/627

spec/integration/_dev/benchmark/rally.scenario.spec.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ spec:
33
additionalProperties: false
44
required:
55
- data_stream
6+
- corpora
67
properties:
78
package:
89
$ref: "./system.scenario.spec.yml#/definitions/package"
@@ -12,11 +13,5 @@ spec:
1213
$ref: "../../manifest.spec.yml#/definitions/version"
1314
data_stream:
1415
$ref: "./system.scenario.spec.yml#/definitions/data_stream"
15-
warmup_time_period:
16-
$ref: "./system.scenario.spec.yml#/definitions/warmup_time_period"
17-
benchmark_time_period:
18-
$ref: "./system.scenario.spec.yml#/definitions/benchmark_time_period"
19-
wait_for_data_timeout:
20-
$ref: "./system.scenario.spec.yml#/definitions/wait_for_data_timeout"
2116
corpora:
2217
$ref: "./system.scenario.spec.yml#/definitions/corpora"

spec/integration/_dev/benchmark/spec.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,27 @@ spec:
3333
type: folder
3434
name: deploy
3535
$ref: "./deploy/spec.yml"
36+
- description: A folder containing resources used by one or more benchmarks.
37+
type: folder
38+
pattern: '^[a-z0-9]+-benchmark$'
39+
additionalContents: false
40+
required: false
41+
contents:
42+
- description: A file with the config definition for the corpus generator.
43+
type: file
44+
name: 'config.yml'
45+
contentMediaType: "application/x-yaml"
46+
required: false
47+
- description: A file with the fields definition for the corpus generator
48+
type: file
49+
name: 'fields.yml'
50+
contentMediaType: "application/x-yaml"
51+
required: false
52+
- description: A file with the template for the corpus generator
53+
type: file
54+
name: 'template.ndjson'
55+
contentMediaType: "application/json"
56+
required: false
3657
- description: A rally benchmark scenario.
3758
type: file
3859
pattern: '^.+\.yml$'
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
- name: timestamp
2+
type: date
3+
- name: container.id
4+
type: keyword
5+
- name: log.file.path
6+
example: /var/log/fun-times.log
7+
type: keyword
8+
- name: log.flags
9+
type: keyword
10+
- name: log.offset
11+
type: long
12+
- name: tags
13+
type: keyword
14+
- name: IP
15+
type: ip
16+
- name: StatusCode
17+
type: keyword
18+
- name: Size
19+
type: long
20+
- name: Hostname
21+
type: keyword
22+
- name: Port
23+
type: long
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
- name: IP
2+
type: ip
3+
- name: Day
4+
type: long
5+
- name: Mon
6+
type: keyword
7+
- name: H
8+
type: long
9+
- name: MS
10+
type: long
11+
- name: StatusCode
12+
type: keyword
13+
- name: Size
14+
type: long
15+
- name: Hostname
16+
type: keyword
17+
- name: Port
18+
type: long
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{- $timestamp := generate "timestamp" -}}
2+
{
3+
"@timestamp": "{{ $timestamp.Format "2006-01-02T15:04:05.999999Z07:00" }}",
4+
"data_stream.type": "logs",
5+
"data_stream.dataset": "rally_benchmarks.testds",
6+
"data_stream.namespace": "ep",
7+
"container.id": "{{ generate "container.id" }}",
8+
"input.type": "filestream",
9+
"log.file.path": "{{ generate "log.file.path" }}",
10+
"log.flags": "{{ generate "log.flags" }}",
11+
"log.offset": {{ generate "log.offset" }},
12+
"tags": ["rally_benchmark.testds", "forwarded", "{{ generate "tags" }}" ],
13+
"message": "{{ generate "IP" }} - - [{{ $timestamp.Format "02/Jan/2006:15:04:05.999999 -0700" }}] \"GET /favicon.ico HTTP/1.1\" {{ generate "StatusCode" }} {{ generate "Size" }} \"http://{{ generate "Hostname" }}:{{ generate "Port" }}/\" \"skip-this-one/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36\""
14+
}

test/packages/integration_benchmarks/_dev/benchmark/rally/deploy/docker/docker-compose.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
---
2-
description: Benchmark 20MiB of data ingested
3-
data_stream.name: test
4-
warmup_time_period: 10s
5-
corpora.generator.total_events: 20000
6-
corpora.generator.template.raw: '{"@timestamp": "2016-12-07T10:04:37.000Z", "message": "a message"}'
7-
corpora.generator.config.path: ./20mb-track/config.yml
8-
corpora.generator.fields.path: ./20mb-track/fields.yml
2+
description: Benchmark 20000 events ingested
3+
data_stream:
4+
name: test
5+
corpora:
6+
generator:
7+
total_events: 20000
8+
template:
9+
type: gotext
10+
path: ./20000-benchmark/template.ndjson
11+
config:
12+
path: ./20000-benchmark/config.yml
13+
fields:
14+
path: ./20000-benchmark/fields.yml

0 commit comments

Comments
 (0)