1#![ cfg_attr( doc, doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "readme.md" ) ) ) ]
3#![ doc( html_logo_url = "https://raw.githubusercontent.com/Wandalen/wTools/master/asset/img/logo_v3_trans_square.png" ) ]
4#![ doc(
5 html_favicon_url = "https://raw.githubusercontent.com/Wandalen/wTools/alpha/asset/img/logo_v3_trans_square_icon_small_v2.ico"
6) ]
7#![ doc( html_root_url = "https://docs.rs/benchkit/latest/benchkit/" ) ]
8#![ allow( clippy::std_instead_of_core ) ]
9#![ allow( clippy::format_push_string ) ]
10#![ allow( clippy::must_use_candidate ) ]
11#![ allow( clippy::uninlined_format_args ) ]
12#![ allow( clippy::doc_markdown ) ]
13#![ allow( clippy::missing_errors_doc ) ]
14#![ allow( clippy::implicit_hasher ) ]
15#![ allow( clippy::cast_possible_truncation ) ]
16#![ allow( clippy::needless_pass_by_value ) ]
17#![ allow( clippy::redundant_closure_for_method_calls ) ]
18#![ allow( clippy::cast_sign_loss ) ]
19#![ allow( clippy::used_underscore_binding ) ]
20#![ allow( clippy::missing_panics_doc ) ]
21#![ allow( clippy::return_self_not_must_use ) ]
22#![ allow( clippy::useless_format ) ]
23#![ allow( clippy::if_not_else ) ]
24#![ allow( clippy::unnecessary_wraps ) ]
25#![ allow( clippy::cloned_instead_of_copied ) ]
26#![ allow( clippy::unnecessary_debug_formatting ) ]
27#![ allow( clippy::needless_borrows_for_generic_args ) ]
28#![ allow( clippy::inherent_to_string ) ]
29#![ allow( clippy::unnecessary_map_or ) ]
30#![ allow( clippy::unused_self ) ]
31#![ allow( clippy::too_many_lines ) ]
32#![ allow( clippy::needless_borrow ) ]
33#![ allow( clippy::single_char_add_str ) ]
34#![ allow( clippy::match_same_arms ) ]
35#![ allow( clippy::empty_line_after_outer_attr ) ]
36#![ allow( clippy::similar_names ) ]
37#![ allow( clippy::uninlined_format_args ) ]
38#![ allow( clippy::format_push_string ) ]
39#![ allow( unused_imports ) ]
40
41#[ cfg( feature = "enabled" ) ]
42fn check_directory_recommendations()
43{
44 #[ cfg( debug_assertions ) ]
45 if let Ok( current_dir ) = std::env::current_dir()
46 {
47 if let Some( dir_name ) = current_dir.file_name().and_then( | n | n.to_str() )
48 {
49 if dir_name == "benches"
50 {
51 eprintln!( "✅ benchkit: Running in REQUIRED benches/ directory - CORRECT!" );
52 eprintln!( " Remember to update benches/readme.md with your benchmark results" );
53 eprintln!( " Use MarkdownUpdater to automatically maintain comprehensive reports" );
54 eprintln!( " See: https://docs.rs/benchkit#mandatory-benches-directory" );
55 }
56 else if dir_name == "tests" || dir_name == "examples" || dir_name == "src"
57 {
58 eprintln!( "❌ benchkit ERROR: Benchmarks MUST be in benches/ directory!" );
59 eprintln!( " Current location: {}/", dir_name );
60 eprintln!( " REQUIRED: Move ALL benchmark files to benches/ directory" );
61 eprintln!( " Benchmarks are NOT tests - they belong in benches/ ONLY" );
62 eprintln!( " See: https://docs.rs/benchkit#mandatory-benches-directory" );
63 }
64 }
65 }
66}
67
68#[ cfg( feature = "enabled" ) ]
69pub mod measurement;
70
71#[ cfg( feature = "enabled" ) ]
72pub mod analysis;
73
74#[ cfg( feature = "enabled" ) ]
75pub mod suite;
76
77#[ cfg( feature = "markdown_reports" ) ]
78pub mod reporting;
79
80#[ cfg( feature = "markdown_reports" ) ]
81pub mod update_chain;
82
83#[ cfg( feature = "markdown_reports" ) ]
84pub mod templates;
85
86#[ cfg( feature = "enabled" ) ]
87pub mod validation;
88
89#[ cfg( feature = "data_generators" ) ]
90pub mod generators;
91
92#[ cfg( feature = "enabled" ) ]
93pub mod scaling;
94
95#[ cfg( feature = "enabled" ) ]
96pub mod profiling;
97
98#[ cfg( feature = "markdown_reports" ) ]
99pub mod documentation;
100
101#[ cfg( feature = "enabled" ) ]
102pub mod comparison;
103
104#[ cfg( feature = "diff_analysis" ) ]
105pub mod diff;
106
107#[ cfg( feature = "visualization" ) ]
108pub mod plotting;
109
110#[ cfg( feature = "statistical_analysis" ) ]
111pub mod statistical;
112
113#[ cfg( feature = "enabled" ) ]
114pub mod data_generation;
115
116#[ cfg( feature = "enabled" ) ]
117pub mod throughput;
118
119#[ cfg( feature = "enabled" ) ]
120pub mod memory_tracking;
121
122#[ cfg( feature = "enabled" ) ]
123pub mod parser_analysis;
124
125#[ cfg( feature = "enabled" ) ]
126pub mod parser_data_generation;
127
128#[ cfg( feature = "enabled" ) ]
130pub mod prelude
131{
132 pub use crate::measurement::*;
133 pub use crate::analysis::*;
134 pub use crate::suite::*;
135 pub use std::time::{ Duration, Instant };
136
137 #[ cfg( feature = "markdown_reports" ) ]
138 pub use crate::reporting::*;
139
140 #[ cfg( feature = "markdown_reports" ) ]
141 pub use crate::update_chain::*;
142
143 #[ cfg( feature = "markdown_reports" ) ]
144 pub use crate::templates::*;
145
146 pub use crate::validation::*;
147
148 #[ cfg( feature = "data_generators" ) ]
149 pub use crate::generators::*;
150
151 pub use crate::scaling::*;
152 pub use crate::profiling::*;
153 pub use crate::comparison::*;
154
155 #[ cfg( feature = "markdown_reports" ) ]
156 pub use crate::documentation::*;
157
158 #[ cfg( feature = "diff_analysis" ) ]
159 pub use crate::diff::*;
160
161 #[ cfg( feature = "visualization" ) ]
162 pub use crate::plotting::*;
163
164 #[ cfg( feature = "statistical_analysis" ) ]
165 pub use crate::statistical::*;
166
167 pub use crate::data_generation::*;
168 pub use crate::throughput::*;
169 pub use crate::memory_tracking::*;
170 pub use crate::parser_analysis::*;
171 pub use crate::parser_data_generation::*;
172}