1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Output formats for `JouleProfiler`.
//!
//! This module defines the supported output formats and provides utilities
//! for selecting and displaying metrics collected by `JouleProfiler`.
//! It includes built-in formats for terminal display, JSON export, and CSV export.
//!
//! # Overview
//!
//! - [`OutputFormat`] — Enum representing the available output formats.
//! - `csv`, `json`, `terminal` — Submodules implementing the actual display logic for default output formats.
use ;
/// Represents the supported output formats for `JouleProfiler`.
///
/// This enum defines how metrics are displayed or exported. It is used
/// by the profiler to select the appropriate output method based on
/// user preferences or CLI flags.
/// The output format is used to instanciate a [`crate::displayer::Displayer`].
///
/// # Variants
///
/// - `Terminal` — Display metrics directly in the terminal (default).
/// - `Json` — Export metrics as JSON for easy parsing or integration.
/// - `Csv` — Export metrics in CSV format for spreadsheets or analysis.
/// Determine output format from flags