--- # # Playbook that utilizes the Performance Co-Pilot toolkit # to collect system metrics and generate figures for analysis. # Relies on the corresponding `pcp_metrics` Ansible role. # # The best place to call this hook is under post_tests actions. # - name: Collect performance metrics hosts: "{{ cifmw_pcp_metrics_hosts | default('all,!localhost') }}" gather_facts: false tasks: - name: Gather metrics ansible.builtin.include_role: name: pcp_metrics tasks_from: gather - name: Process metrics hosts: localhost tasks: - name: Gather annotations ansible.builtin.include_role: name: pcp_metrics tasks_from: annotations - name: Generate figures ansible.builtin.include_role: name: pcp_metrics tasks_from: plot - name: Copy results to ci-framework-data ansible.builtin.copy: src: /tmp/pcp-metrics/ dest: "{{ ansible_user_dir }}/ci-framework-data/logs/metrics" mode: preserve