summaryrefslogtreecommitdiffstats
path: root/tests/data
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-02-05 12:24:30 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-02-15 07:03:25 +0800
commitcdb8e1be12b724e9f68c7e46c9a653ec37c502cb (patch)
tree647fb60a48282deab3387deb493a1b3200aa6d96 /tests/data
parent0f3ad6f2db26fb91190e47c89f77fb59b7601b84 (diff)
Implement logfile collector and grep parser
JIRA: QTIP-207 JIRA: QTIP-208 Change-Id: Icc14d3097fb305e59df716636ef87504490c9d1b Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/benchmarks/QPI/fake_qpi.yaml (renamed from tests/data/benchmarks/QPI/fake-qpi.yaml)0
-rw-r--r--tests/data/benchmarks/plan/doctor.yaml44
-rw-r--r--tests/data/benchmarks/plan/fake-plan.yaml10
-rw-r--r--tests/data/fake.log9
4 files changed, 29 insertions, 34 deletions
diff --git a/tests/data/benchmarks/QPI/fake-qpi.yaml b/tests/data/benchmarks/QPI/fake_qpi.yaml
index aa1097f4..aa1097f4 100644
--- a/tests/data/benchmarks/QPI/fake-qpi.yaml
+++ b/tests/data/benchmarks/QPI/fake_qpi.yaml
diff --git a/tests/data/benchmarks/plan/doctor.yaml b/tests/data/benchmarks/plan/doctor.yaml
index f884c606..f8dcf08d 100644
--- a/tests/data/benchmarks/plan/doctor.yaml
+++ b/tests/data/benchmarks/plan/doctor.yaml
@@ -4,34 +4,30 @@ info:
facility: local
engineer: local
config:
- driver: sample
collectors:
- type: logfile
+ paths:
+ - '../../external/doctor-verify-apex-sample-master'
logs:
- filename: doctor_consumer.log
- # 2016-12-28 03:16:05,630 consumer.py 26 INFO doctor consumer notified at 1482894965.63
- grep:
- - regex: 'doctor consumer notified at \d+(\.\d+)?$'
- capture: notified consumer
+ parsers:
+ - type: grep
+ regex: 'doctor consumer notified at (?P<notified>\d+(?:\.\d+)?)$'
- filename: doctor_inspector.log
- # 2016-12-28 03:16:05,299 inspector.py 76 INFO event posted at 1482894965.3
- # 2016-12-28 03:16:05,299 inspector.py 56 INFO doctor mark vm(<Server: doctor_vm1>) error at 1482894965.3
- # 2016-12-28 03:16:05,506 inspector.py 66 INFO doctor mark host(overcloud-novacompute-1.ool-virtual1) down at 1482894965.51
- grep:
- - regex: 'event posted at \d+(\.\d+)?$'
- capture: posted event
- - regex: 'doctor mark vm\(.*\) error at \d+(\.\d+)?$'
- capture: marked VM error
- - regex: 'doctor mark host\(.*\) down at \d+(\.\d+)?$'
- capture: marked host down
+ parsers:
+ - type: grep
+ regex: 'event posted at (?P<event_posted>\d+(?:\.\d+)?)$'
+ - type: grep
+ regex: 'doctor mark vm\(.*\) error at (?P<vm_error>\d+(?:\.\d+)?)$'
+ - type: grep
+ regex: 'doctor mark host\(.*\) down at (?P<host_down>\d+(?:\.\d+)?)$'
- filename: disable_network.log
- # doctor set host down at 1482894965.164096803
- grep:
- - regex: 'doctor set host down at \d+(\.\d+)?$'
- capture: set host down
- reporter:
- name: console
- # transform collected data into timeline
- transformer: timeline
+ parsers:
+ - type: grep
+ regex: 'doctor set host down at (?P<network_down>\d+(?:\.\d+)?)$'
+ reporters:
+ - type: console
+ # transform collected data into timeline
+ transformer: timeline
QPIs:
- - fake-qpi.yaml
+ - fake_qpi.yaml
diff --git a/tests/data/benchmarks/plan/fake-plan.yaml b/tests/data/benchmarks/plan/fake-plan.yaml
deleted file mode 100644
index 511affd6..00000000
--- a/tests/data/benchmarks/plan/fake-plan.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-name: fake plan
-description: fake benchmark plan for demonstration and testing
-config:
- facility: local
- engineer: local
- driver: sample
- collectors: []
- reporter: console
-QPIs:
- - fake-qpi.yaml
diff --git a/tests/data/fake.log b/tests/data/fake.log
new file mode 100644
index 00000000..bab71e5a
--- /dev/null
+++ b/tests/data/fake.log
@@ -0,0 +1,9 @@
+Lorem ipsum dolor sit amet,
+consectetur adipiscing elit,
+sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+
+Ut enim ad minim veniam,
+quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+
+Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
+Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.