Skip to content

Thedtk24/iPerf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

iPerf

A lightweight bash profiling script to measure and analyze the performance, memory usage, and parallel efficiency of High-Performance Computing (HPC) and multithreaded applications.

Designed specifically for macOS (utilizing /usr/bin/time -l and sysctl), perf.sh provides an instant colorized report of how well your program utilizes system resources.

Features

  • Execution Time Tracking: Captures real (wall-clock), user, and system time.
  • RAM Profiling: Accurately extracts the maximum resident set size (RSS) to report peak memory usage in Megabytes.
  • Parallel Efficiency: Automatically calculates CPU utilization efficiency based on the number of available logical CPU cores.
  • Visual Feedback: Colorized terminal output with efficiency grading (Excellent, Average, Poor) to quickly spot bottlenecks in OpenMP/MPI applications.

Prerequisites

  • macOS Environment: Relies on Apple's BSD version of time (/usr/bin/time -l) and sysctl.
  • Basic UNIX utilities: bc (for float calculations), awk, grep, and tr.

Usage

Simply prefix your standard execution command with ./perf.sh:

chmod +x perf.sh
./perf.sh ./your_program [arguments...]

Sample Output:

==> Profilage de : ./test

Valeur de PI : 3.141593
Temps calculé par OpenMP : 0.812300 secondes
--------------------------------------------------
             HPC PERFORMANCE REPORT
--------------------------------------------------
 * Temps Réel (Wall-clock) : 0.82 s
 * Temps CPU Total         : 3.25 s
 * Pic de RAM (RSS)        : 2.15 Mo
 * Coeurs utilisés (log)   : 4
 * Efficacité Parallèle    : 99.08% (Excellent)
--------------------------------------------------

About

Code perf analysis for MacOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors