C Profiler + Web Visualization Platform
A complete profiling solution for C programs. Profile your code with a lightweight C library, then upload and visualize performance data through an interactive web dashboard.
Khronos consists of two integrated components:
- C Profiler Library - Lightweight profiling for C programs with nanosecond precision
- Flask Web Application - Upload, analyze, and visualize profiling data with interactive charts
- Minimal overhead with nanosecond precision timing
- JSON export for easy data portability
- Simple 5-function API
- Robust error handling
- Uses
clock_gettime(CLOCK_MONOTONIC)for accuracy
- Interactive charts (bar charts, pie charts)
- Analysis history and dashboard
- User authentication and session management
- CSRF protection and rate limiting
- Responsive Bootstrap UI
khronos/
├── c_profiler/ # C profiling library
│ ├── profiler.h # Header file
│ ├── profiler.c # Implementation
│ ├── examples/ # Example programs
│ └── README.md # C library documentation
│
├── flask_app/ # Web application
│ ├── app.py # Main Flask application
│ ├── config.py # Configuration
│ ├── helpers.py # Helper functions
│ ├── schema.py # Database operations
│ ├── templates/ # HTML templates
│ ├── static/ # CSS, JS, assets
│ ├── utils/ # Library zip folder
│ ├── .env # Environment secrets variables
│ └── requirements.txt # Python dependencies
│
├── .gitignore # Files ignored to git operations
└── README.md # Web app documentation
┌─────────────────┐
│ Your C Program │
│ + profiler.h │
└────────┬────────┘
│
│ 1. Profile functions
▼
┌─────────────────┐
│ profiler_data │
│ .json file │
└────────┬────────┘
│
│ 2. Upload to web app
▼
┌─────────────────┐
│ Flask Web App │
│ + Database │
└────────┬────────┘
│
│ 3. View reports
▼
┌─────────────────┐
│ Interactive │
│ Dashboard │
│ + Charts │
└─────────────────┘
- Navigate to
c_profiler/ - See c_profiler/README.md for detailed instructions
- Quick start:
#include "profiler.h"
int main(void) {
profiler_init();
profiler_start("my_function");
my_function();
profiler_stop("my_function");
profiler_save_data("my_program");
profiler_cleanup();
}Visit the deployed application at [https://khronos.sibeni.dev] to:
- Register an account
- Upload your JSON profiling data
- View interactive reports and dashboards
- Language: C (C99+)
- Standard: POSIX.1b-1993
- Timing:
clock_gettime(CLOCK_MONOTONIC)
- Backend: Flask (Python)
- Database: SQLite
- Frontend: Bootstrap 5, Plotly.js
- Security: Flask-WTF (CSRF), Flask-Limiter (rate limiting)
- Session: Flask-Session (filesystem)
- The C profiler is single-threaded only and not thread-safe
- Requires POSIX-compliant system (Linux, macOS, BSD)