• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ZJU-SPAIL / pipa / 22699554347

05 Mar 2026 02:33AM UTC coverage: 19.922% (-50.1%) from 70.041%
22699554347

push

github

Rui Hu
Merge github/main, resolve two version conflicts by keeping gitlab local

6 of 2484 new or added lines in 35 files covered. (0.24%)

871 of 4372 relevant lines covered (19.92%)

0.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/pipa/parser/sar_cpu_parser.py
1
"""CPU-specific sar CSV parser.
2

3
Provides a thin wrapper around :func:`generic_sar_parse` that normalizes the
4
``CPU`` column, replacing ``-1`` with ``all`` to denote the aggregated view.
5
"""
6

NEW
7
from __future__ import annotations
×
8

NEW
9
from pathlib import Path
×
10

NEW
11
import pandas as pd
×
12

NEW
13
from ._base_sar_parser import generic_sar_parse
×
14

15

NEW
16
def parse(file_path: Path) -> pd.DataFrame:
×
17
    """Parse ``sar_cpu.csv`` files.
18

19
    Parameters
20
    ----------
21
    file_path:
22
        Path to the CSV produced by ``sadf -d -- -P ALL``.
23
    """
24

NEW
25
    dataframe = generic_sar_parse(file_path)
×
NEW
26
    if dataframe.empty or "CPU" not in dataframe.columns:
×
NEW
27
        return dataframe
×
28

NEW
29
    dataframe["CPU"] = dataframe["CPU"].astype(str)
×
NEW
30
    dataframe.loc[dataframe["CPU"] == "-1", "CPU"] = "all"
×
NEW
31
    return dataframe
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc