@@ -3,6 +3,7 @@ use std::path::{Path, PathBuf};
33use anyhow:: Context as _;
44use aws_config:: { retry:: RetryConfig , BehaviorVersion , Region } ;
55use aws_sdk_s3:: config:: { Credentials , SharedCredentialsProvider } ;
6+ use chrono:: DateTime ;
67use libsql_wal:: io:: StdIO ;
78use libsql_wal:: storage:: backend:: s3:: S3Backend ;
89use libsql_wal:: storage:: compaction:: strategy:: identity:: IdentityStrategy ;
@@ -80,11 +81,15 @@ impl WalToolkit {
8081 if let Some ( ( first, last) ) = compactor. get_segment_range ( & namespace) ? {
8182 println ! (
8283 "- oldest segment: {}-{} ({})" ,
83- first. key. start_frame_no, first. key. end_frame_no, first. created_at
84+ first. key. start_frame_no,
85+ first. key. end_frame_no,
86+ DateTime :: from_timestamp_millis( first. key. timestamp as _) . unwrap( )
8487 ) ;
8588 println ! (
8689 "- most recent segment: {}-{} ({})" ,
87- last. key. start_frame_no, last. key. end_frame_no, last. created_at
90+ last. key. start_frame_no,
91+ last. key. end_frame_no,
92+ DateTime :: from_timestamp_millis( last. key. timestamp as _) . unwrap( )
8893 ) ;
8994 }
9095
@@ -93,7 +98,9 @@ impl WalToolkit {
9398 compactor. list_all ( & namespace, |info| {
9499 println ! (
95100 "- {}-{} ({})" ,
96- info. key. start_frame_no, info. key. end_frame_no, info. created_at
101+ info. key. start_frame_no,
102+ info. key. end_frame_no,
103+ DateTime :: from_timestamp_millis( info. key. timestamp as _) . unwrap( )
97104 ) ;
98105 } ) ?;
99106 }
0 commit comments