Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add measurement recipe run export to JSON #322

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

Kuba314
Copy link
Contributor

@Kuba314 Kuba314 commented Aug 15, 2023

Description

Adds a new RecipeRunFormatter capable of exporting just measurement results into JSON. Example of what the output might looks like:

JSON
[
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ip_add",
            "args": [
                "Ip4Address(192.168.101.1/24)"
            ],
            "kwargs": []
        }
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ip_add",
            "args": [
                "Ip6Address(fc00::1/64)"
            ],
            "kwargs": []
        }
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "up_and_wait",
            "args": [],
            "kwargs": []
        }
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ip_add",
            "args": [
                "Ip4Address(192.168.101.2/24)"
            ],
            "kwargs": []
        }
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ip_add",
            "args": [
                "Ip6Address(fc00::2/64)"
            ],
            "kwargs": []
        }
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "up_and_wait",
            "args": [],
            "kwargs": []
        }
    },
    {
        "result": "PASS",
        "type": "unknown",
        "description": "Summary of used Recipe parameters:\n{'cpu_perf_tool': <class 'lnst.RecipeCommon.Perf.Measurements.StatCPUMeasurement.StatCPUMeasurement'>,\n 'dev_intr_cpu': [0],\n 'disable_turboboost': False,\n 'do_linuxperf_measurement': False,\n 'driver': 'i40e',\n 'drop_caches': False,\n 'ip_versions': ['ipv4'],\n 'net_ipv4': IPv4Network('192.168.101.0/24'),\n 'net_ipv6': IPv6Network('fc00::/64'),\n 'net_perf_tool': 'iperf',\n 'offload_combinations': ({'gro': 'on',\n                           'gso': 'on',\n                           'rx': 'on',\n                           'tso': 'on',\n                           'tx': 'on'},),\n 'perf_duration': 10,\n 'perf_evaluation_strategy': 'all',\n 'perf_iterations': 2,\n 'perf_msg_sizes': [123],\n 'perf_parallel_processes': 1,\n 'perf_parallel_streams': 1,\n 'perf_tests': ['tcp_stream'],\n 'perf_tool_cpu': [1],\n 'perf_warmup_duration': 0,\n 'ping_bidirect': False,\n 'ping_count': 30,\n 'ping_interval': 0.2,\n 'ping_parallel': False,\n 'ping_psize': 56,\n 'udp_fragmentation_threshold': 104857600,\n 'udp_fragmentation_time': 1}"
    },
    {
        "result": "PASS",
        "type": "unknown",
        "description": "Testwide configuration for recipe SimpleNetworkRecipe description:\nConfigured host1.eth1.ips = [Ip4Address(192.168.101.1/24), Ip6Address(fc00::1/64), Ip6Address(fe80::c042:b9ff:fe64:6bba/64)]\nConfigured host2.eth1.ips = [Ip4Address(192.168.101.2/24), Ip6Address(fc00::2/64)]"
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "service irqbalance stop"
        }
    },
    {
        "result": "FAIL",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "service irqbalance stop"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "service irqbalance stop"
        }
    },
    {
        "result": "FAIL",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "service irqbalance stop"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "lscpu"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "lscpu"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "grep -P \"eth1\" /proc/interrupts | cut -f1 -d: | sed 's/ //'"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "grep -P \"eth1\" /proc/interrupts | cut -f1 -d: | sed 's/ //'"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "lscpu"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "lscpu"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "grep -P \"eth1\" /proc/interrupts | cut -f1 -d: | sed 's/ //'"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "grep -P \"eth1\" /proc/interrupts | cut -f1 -d: | sed 's/ //'"
        }
    },
    {
        "result": "PASS",
        "type": "unknown",
        "description": "Sub configuration description:\nconfiguration of idle states skipped\nconfiguration of turboboost through intel_pstate skipped\nCurrently configured offload combination: gro=on gso=on rx=on tso=on tx=on\nmtu configuration skipped.\nadaptive_rx_coalescing configuration skipped.\nadaptive_tx_coalescing configuration skipped.\nhost1 irqbalance stopped\nhost2 irqbalance stopped\nhost1.eth0 irqs bound to cpu [0]\nhost2.eth0 irqs bound to cpu [0]\nParallel streams qdisc configuration skipped.\nrx_pause_frames configuration skipped.\ntx_pause_frames configuration skipped."
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ips_filter",
            "args": [],
            "kwargs": [
                "family=<AddressFamily.AF_INET: 2>"
            ]
        }
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ips_filter",
            "args": [],
            "kwargs": [
                "family=<AddressFamily.AF_INET: 2>"
            ]
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "Ping(dst=Ip4Address(192.168.101.2/24), interface=Ip4Address(192.168.101.1/24), count=30, interval=0.2, size=56)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "Ping(dst=Ip4Address(192.168.101.2/24), interface=Ip4Address(192.168.101.1/24), count=30, interval=0.2, size=56)"
        }
    },
    {
        "result": "PASS",
        "type": "measurement",
        "measurement_type": "ping",
        "data": {
            "trans_pkts": "30",
            "recv_pkts": "30",
            "rate": 100,
            "rtt_min": 0.034,
            "rtt_max": 0.134,
            "rtt_avg": 0.082,
            "rtt_mdev": 0.023
        }
    },
    {
        "result": "PASS",
        "type": "unknown",
        "description": "measured rate 100 is more than min_rate(50)"
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ips_filter",
            "args": [],
            "kwargs": [
                "family=<AddressFamily.AF_INET: 2>"
            ]
        }
    },
    {
        "result": "PASS",
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ips_filter",
            "args": [],
            "kwargs": [
                "family=<AddressFamily.AF_INET: 2>"
            ]
        }
    },
    {
        "result": "PASS",
        "type": "unknown",
        "description": "Performance test tweaks:\nskipped configuration of fragmentation thresholds\nskipped addition of iptables rules to drop SCTP packets on other than tested interface"
    },
    {
        "result": "PASS",
        "type": "unknown",
        "description": "Performance test iteration tweaks:\nskipped dropping vm caches before iteration"
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "IperfServer(bind=Ip4Address(192.168.101.2/24), oneoff=True, cpu_bind=[1], port=12000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "IperfClient(server=Ip4Address(192.168.101.2/24), duration=10, warmup_duration=0, cpu_bind=[1], blksize=123, port=12000, client_port=12000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "IperfServer(bind=Ip4Address(192.168.101.2/24), oneoff=True, cpu_bind=[1], port=12000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "IperfClient(server=Ip4Address(192.168.101.2/24), duration=10, warmup_duration=0, cpu_bind=[1], blksize=123, port=12000, client_port=12000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "result": "PASS",
        "type": "unknown",
        "description": "Performance test iteration tweaks:\nskipped dropping vm caches before iteration"
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "IperfServer(bind=Ip4Address(192.168.101.2/24), oneoff=True, cpu_bind=[1], port=12000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "IperfClient(server=Ip4Address(192.168.101.2/24), duration=10, warmup_duration=0, cpu_bind=[1], blksize=123, port=12000, client_port=12000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "IperfServer(bind=Ip4Address(192.168.101.2/24), oneoff=True, cpu_bind=[1], port=12000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "IperfClient(server=Ip4Address(192.168.101.2/24), duration=10, warmup_duration=0, cpu_bind=[1], blksize=123, port=12000, client_port=12000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "result": "PASS",
        "type": "measurement",
        "measurement_type": "cpu",
        "data": {
            "utilization": 113.23647133242504
        }
    },
    {
        "result": "PASS",
        "type": "measurement",
        "measurement_type": "cpu",
        "data": {
            "utilization": 113.25793853978745
        }
    },
    {
        "result": "PASS",
        "type": "measurement",
        "measurement_type": "flow",
        "data": {
            "generator_results": 125905264.81313463,
            "generator_cpu_stats": 38.1296152743256,
            "receiver_results": 125401853.91916041,
            "receiver_cpu_stats": 30.95296525636096
        }
    },
    {
        "result": "PASS",
        "type": "unknown",
        "description": "Nonzero evaluation of flow:\nFlow(\n    type=tcp_stream,\n    generator=Host(machine_id=host1),\n    generator_bind=192.168.101.1,\n    generator_nic=Device(machine=host1, id=eth0, name=eth1, ifindex=3),\n    generator_port=12000,\n    receiver=Host(machine_id=host2),\n    receiver_bind=192.168.101.2,\n    receiver_nic=Device(machine=host2, id=eth0, name=eth1, ifindex=3),\n    receiver_port=12000,\n    msg_size=123,\n    duration=10,\n    parallel_streams=1,\n    generator_cpupin=[1],\n    receiver_cpupin=[1],\n    aggregated_flow=False\n    warmup_duration=0,\n)\nPASS: generator_results reported non-zero throughput\nPASS: receiver_results reported non-zero throughput"
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "service irqbalance start"
        }
    },
    {
        "result": "FAIL",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "service irqbalance start"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "service irqbalance start"
        }
    },
    {
        "result": "FAIL",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "service irqbalance start"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "cpupower idle-set -E"
        }
    },
    {
        "result": "FAIL",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "cpupower idle-set -E"
        }
    },
    {
        "result": "PASS",
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "cpupower idle-set -E"
        }
    },
    {
        "result": "FAIL",
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "cpupower idle-set -E"
        }
    }
]

Tests

Tested locally with a custom runner printing the JSON-formatted summary.

Reviews

@LNST-project/lnst-developers

Closes: #320

@Kuba314
Copy link
Contributor Author

Kuba314 commented Aug 15, 2023

I'm a bit unsure about the class names here. Feel free to provide any suggestions.

@Kuba314
Copy link
Contributor Author

Kuba314 commented Aug 22, 2023

@olichtne Changed the format a bit and also format every result, not just measurement results.

New JSON format
[
    {
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ip_add",
            "args": [
                "Ip4Address(192.168.101.1/24)"
            ],
            "kwargs": []
        }
    },
    {
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ip_add",
            "args": [
                "Ip6Address(fc00::1/64)"
            ],
            "kwargs": []
        }
    },
    {
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "up_and_wait",
            "args": [],
            "kwargs": []
        }
    },
    {
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ip_add",
            "args": [
                "Ip4Address(192.168.101.2/24)"
            ],
            "kwargs": []
        }
    },
    {
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ip_add",
            "args": [
                "Ip6Address(fc00::2/64)"
            ],
            "kwargs": []
        }
    },
    {
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "up_and_wait",
            "args": [],
            "kwargs": []
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "service irqbalance stop"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "service irqbalance stop"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "service irqbalance stop"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "service irqbalance stop"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "lscpu"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "lscpu"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "grep -P \"eth1\" /proc/interrupts | cut -f1 -d: | sed 's/ //'"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "grep -P \"eth1\" /proc/interrupts | cut -f1 -d: | sed 's/ //'"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "lscpu"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "lscpu"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "grep -P \"eth1\" /proc/interrupts | cut -f1 -d: | sed 's/ //'"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "grep -P \"eth1\" /proc/interrupts | cut -f1 -d: | sed 's/ //'"
        }
    },
    {
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ips_filter",
            "args": [],
            "kwargs": [
                "family=<AddressFamily.AF_INET: 2>"
            ]
        }
    },
    {
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ips_filter",
            "args": [],
            "kwargs": [
                "family=<AddressFamily.AF_INET: 2>"
            ]
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "Ping(dst=Ip4Address(192.168.101.2/24), interface=Ip4Address(192.168.101.1/24), count=30, interval=0.2, size=56)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "Ping(dst=Ip4Address(192.168.101.2/24), interface=Ip4Address(192.168.101.1/24), count=30, interval=0.2, size=56)"
        }
    },
    {
        "type": "measurement",
        "measurement_type": "ping",
        "data": {
            "trans_pkts": "30",
            "recv_pkts": "30",
            "rate": 100,
            "rtt_min": 0.023,
            "rtt_max": 0.098,
            "rtt_avg": 0.058,
            "rtt_mdev": 0.019
        }
    },
    {
        "type": "device_method_call",
        "host": "host1",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ips_filter",
            "args": [],
            "kwargs": [
                "family=<AddressFamily.AF_INET: 2>"
            ]
        }
    },
    {
        "type": "device_method_call",
        "host": "host2",
        "netns": "",
        "dev_id": "eth0",
        "method": {
            "name": "ips_filter",
            "args": [],
            "kwargs": [
                "family=<AddressFamily.AF_INET: 2>"
            ]
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "IperfServer(bind=Ip4Address(192.168.101.2/24), oneoff=True, cpu_bind=[1], port=12000)"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "IperfClient(server=Ip4Address(192.168.101.2/24), duration=10, warmup_duration=0, cpu_bind=[1], blksize=123, port=12000, client_port=12000)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "IperfServer(bind=Ip4Address(192.168.101.2/24), oneoff=True, cpu_bind=[1], port=12000)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "IperfClient(server=Ip4Address(192.168.101.2/24), duration=10, warmup_duration=0, cpu_bind=[1], blksize=123, port=12000, client_port=12000)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "IperfServer(bind=Ip4Address(192.168.101.2/24), oneoff=True, cpu_bind=[1], port=12000)"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "module",
            "repr": "IperfClient(server=Ip4Address(192.168.101.2/24), duration=10, warmup_duration=0, cpu_bind=[1], blksize=123, port=12000, client_port=12000)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "IperfServer(bind=Ip4Address(192.168.101.2/24), oneoff=True, cpu_bind=[1], port=12000)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "IperfClient(server=Ip4Address(192.168.101.2/24), duration=10, warmup_duration=0, cpu_bind=[1], blksize=123, port=12000, client_port=12000)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "module",
            "repr": "CPUStatMonitor(interval=1000)"
        }
    },
    {
        "type": "measurement",
        "measurement_type": "cpu",
        "data": {
            "utilization": 141.9735541344335
        }
    },
    {
        "type": "measurement",
        "measurement_type": "cpu",
        "data": {
            "utilization": 142.29364231769054
        }
    },
    {
        "type": "measurement",
        "measurement_type": "flow",
        "data": {
            "generator_results": 112951335.22424692,
            "generator_cpu_stats": 38.26131813885169,
            "receiver_results": 112497825.88070199,
            "receiver_cpu_stats": 31.39989038805761
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "service irqbalance start"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "service irqbalance start"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "service irqbalance start"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "service irqbalance start"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "ethtool -K eth1  gro on gso on rx on tso on tx on"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "cpupower idle-set -E"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "cpupower idle-set -E"
        }
    },
    {
        "type": "job",
        "action": "start",
        "job": {
            "type": "shell",
            "command": "cpupower idle-set -E"
        }
    },
    {
        "type": "job",
        "action": "end",
        "job": {
            "type": "shell",
            "command": "cpupower idle-set -E"
        }
    }
]

Copy link
Collaborator

@olichtne olichtne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok to me except the two minor comments.

There will be more run summary formatters coming.
Former RunSummaryFormatter has been renamed to
ImportantRunSummaryFormatter.
This RecipeResult descendant should be used to signal that a measurement
has finished and has results. This should be always a `ResultType.PASS`.
`tc` would use `ResultType.FAIL` in case of a failure but still provided
some data, which it probably shouldn't be doing.
@olichtne olichtne merged commit 14b92a7 into LNST-project:master Aug 29, 2023
2 checks passed
@Kuba314 Kuba314 deleted the recipe-run-export branch August 31, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New RecipeRun export format or other import/export alternatives.
2 participants