File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,3 +83,9 @@ required-features = ["protobuf"]
8383# More information: https://docs.rs/about/builds#cross-compiling
8484[package .metadata .docs .rs ]
8585all-features = true
86+
87+
88+ [profile .bench ]
89+ inherits = " release"
90+ debug = true
91+
Original file line number Diff line number Diff line change 11use std:: io:: Result ;
22
33fn main ( ) -> Result < ( ) > {
4+ let proto_files = [ "src/encoding/proto/openmetrics_data_model.proto" ] ;
5+ let include_dirs = [ "src/encoding/proto/" ] ;
46 #[ cfg( feature = "protobuf" ) ]
57 prost_build:: compile_protos (
6- & [ "src/encoding/proto/openmetrics_data_model.proto" ] ,
7- & [ "src/encoding/proto/" ] ,
8+ & proto_files ,
9+ & include_dirs ,
810 ) ?;
911
12+ for path in & proto_files {
13+ println ! ( "cargo:rerun-if-changed={}" , path) ;
14+ }
15+ for path in & include_dirs {
16+ println ! ( "cargo:rerun-if-changed={}" , path) ;
17+ }
1018 Ok ( ( ) )
1119}
Original file line number Diff line number Diff line change @@ -280,6 +280,7 @@ impl MetricEncoder<'_> {
280280 sum: Some ( openmetrics_data_model:: histogram_value:: Sum :: DoubleValue (
281281 sum,
282282 ) ) ,
283+ ..Default :: default ( )
283284 } ,
284285 ) ) ,
285286 ..Default :: default ( )
@@ -342,6 +343,7 @@ impl MetricEncoder<'_> {
342343 positive_delta: positive_deltas. to_vec( ) ,
343344 positive_count: Vec :: new( ) ,
344345 exemplars: Vec :: new( ) ,
346+ ..Default :: default ( )
345347 } ,
346348 ) ) ,
347349 ..Default :: default ( )
You can’t perform that action at this time.
0 commit comments