##############################################################################
# Copyright (c) 2017 ZTE Corporation and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
name: doctor performance profiling
description: create performance profile for OPNFV doctor notification time
info:
  facility: local
  engineer: local
config:
  collectors:
    - type: logfile
      paths:
        - '../../external/doctor-verify-apex-sample-master'
      logs:
        - filename: doctor_consumer.log
          parsers:
            - type: grep
              regex: 'doctor consumer notified at (?P<notified>\d+(?:\.\d+)?)$'
        - filename: doctor_inspector.log
          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
          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