@@ -137,7 +137,11 @@ impl ObjectStorage for LocalFS {
137
137
1 ,
138
138
& Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
139
139
) ;
140
- increment_object_store_calls_by_date ( "localfs" , "HEAD" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
140
+ increment_object_store_calls_by_date (
141
+ "localfs" ,
142
+ "HEAD" ,
143
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
144
+ ) ;
141
145
Err ( ObjectStorageError :: UnhandledError ( Box :: new (
142
146
std:: io:: Error :: new (
143
147
std:: io:: ErrorKind :: Unsupported ,
@@ -164,7 +168,11 @@ impl ObjectStorage for LocalFS {
164
168
1 ,
165
169
& Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
166
170
) ;
167
- increment_object_store_calls_by_date ( "localfs" , "GET" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
171
+ increment_object_store_calls_by_date (
172
+ "localfs" ,
173
+ "GET" ,
174
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
175
+ ) ;
168
176
Ok ( x. into ( ) )
169
177
}
170
178
Err ( e) => {
@@ -234,8 +242,13 @@ impl ObjectStorage for LocalFS {
234
242
"localfs" ,
235
243
"LIST" ,
236
244
files_scanned,
237
- & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
238
- increment_object_store_calls_by_date ( "localfs" , "LIST" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
245
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
246
+ ) ;
247
+ increment_object_store_calls_by_date (
248
+ "localfs" ,
249
+ "LIST" ,
250
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
251
+ ) ;
239
252
Ok ( path_arr)
240
253
}
241
254
@@ -423,7 +436,11 @@ impl ObjectStorage for LocalFS {
423
436
1 ,
424
437
& Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
425
438
) ;
426
- increment_object_store_calls_by_date ( "localfs" , "PUT" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
439
+ increment_object_store_calls_by_date (
440
+ "localfs" ,
441
+ "PUT" ,
442
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
443
+ ) ;
427
444
}
428
445
Err ( _) => {
429
446
STORAGE_REQUEST_RESPONSE_TIME
@@ -483,7 +500,11 @@ impl ObjectStorage for LocalFS {
483
500
1 ,
484
501
& Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
485
502
) ;
486
- increment_object_store_calls_by_date ( "localfs" , "DELETE" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
503
+ increment_object_store_calls_by_date (
504
+ "localfs" ,
505
+ "DELETE" ,
506
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
507
+ ) ;
487
508
}
488
509
Err ( err) => {
489
510
let status_code = match err. kind ( ) {
@@ -511,7 +532,11 @@ impl ObjectStorage for LocalFS {
511
532
STORAGE_REQUEST_RESPONSE_TIME
512
533
. with_label_values ( & [ "localfs" , "HEAD" , "200" ] )
513
534
. observe ( check_elapsed) ;
514
- increment_object_store_calls_by_date ( "localfs" , "HEAD" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
535
+ increment_object_store_calls_by_date (
536
+ "localfs" ,
537
+ "HEAD" ,
538
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
539
+ ) ;
515
540
}
516
541
Err ( err) => {
517
542
let status_code = match err. kind ( ) {
@@ -603,7 +628,11 @@ impl ObjectStorage for LocalFS {
603
628
STORAGE_REQUEST_RESPONSE_TIME
604
629
. with_label_values ( & [ "localfs" , "LIST" , "200" ] )
605
630
. observe ( list_elapsed) ;
606
- increment_object_store_calls_by_date ( "localfs" , "LIST" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
631
+ increment_object_store_calls_by_date (
632
+ "localfs" ,
633
+ "LIST" ,
634
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
635
+ ) ;
607
636
ReadDirStream :: new ( read_dir)
608
637
}
609
638
Err ( err) => {
@@ -650,7 +679,11 @@ impl ObjectStorage for LocalFS {
650
679
STORAGE_REQUEST_RESPONSE_TIME
651
680
. with_label_values ( & [ "localfs" , "LIST" , "200" ] )
652
681
. observe ( list_elapsed) ;
653
- increment_object_store_calls_by_date ( "localfs" , "LIST" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
682
+ increment_object_store_calls_by_date (
683
+ "localfs" ,
684
+ "LIST" ,
685
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
686
+ ) ;
654
687
ReadDirStream :: new ( read_dir)
655
688
}
656
689
Err ( err) => {
@@ -778,7 +811,11 @@ impl ObjectStorage for LocalFS {
778
811
STORAGE_REQUEST_RESPONSE_TIME
779
812
. with_label_values ( & [ "localfs" , "LIST" , "200" ] )
780
813
. observe ( list_elapsed) ;
781
- increment_object_store_calls_by_date ( "localfs" , "LIST" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
814
+ increment_object_store_calls_by_date (
815
+ "localfs" ,
816
+ "LIST" ,
817
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
818
+ ) ;
782
819
read_dir
783
820
}
784
821
Err ( err) => {
@@ -867,7 +904,11 @@ impl ObjectStorage for LocalFS {
867
904
STORAGE_REQUEST_RESPONSE_TIME
868
905
. with_label_values ( & [ "localfs" , "PUT" , "200" ] )
869
906
. observe ( upload_elapsed) ;
870
- increment_object_store_calls_by_date ( "localfs" , "PUT" , & Utc :: now ( ) . date_naive ( ) . to_string ( ) ) ;
907
+ increment_object_store_calls_by_date (
908
+ "localfs" ,
909
+ "PUT" ,
910
+ & Utc :: now ( ) . date_naive ( ) . to_string ( ) ,
911
+ ) ;
871
912
Ok ( ( ) )
872
913
}
873
914
Err ( err) => {
0 commit comments