#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2024 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org> # # This is a sample code about how to use timerlat's timer by any workload # so rtla can measure and provide auto-analysis for the overall latency (IOW # the response time) for a task. # # Before running it, you need to dispatch timerlat with -U option in a terminal. # Then # run this script pinned to a CPU on another terminal. For example: # # timerlat_load.py 1 -p 95 # # The "Timerlat IRQ" is the IRQ latency, The thread latency is the latency # for the python process to get the CPU. The Ret from user Timer Latency is # the overall latency. In other words, it is the response time for that # activation. # # This is just an example, the load is reading 20MB of data from /dev/full # It is in python because it is easy to read :-)
import argparse import sys import os
parser = argparse.ArgumentParser(description='user-space timerlat thread in Python')
parser.add_argument("cpu", type=int, help='CPU to run timerlat thread')
parser.add_argument("-p", "--prio", type=int, help='FIFO priority')
args = parser.parse_args()
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.