@@ -248,7 +248,9 @@ impl Query {
248
248
#[ derive( Debug , Serialize , Clone ) ]
249
249
pub struct CountsRecord {
250
250
/// Start time of the bin
251
- pub counts_timestamp : String ,
251
+ pub counts_start_timestamp : String ,
252
+ /// End time of the bin
253
+ pub counts_end_timestamp : String ,
252
254
/// Number of logs in the bin
253
255
pub log_count : u64 ,
254
256
}
@@ -297,8 +299,8 @@ impl CountsRequest {
297
299
298
300
for bin in counts {
299
301
// extract start and end time to compare
300
- let counts_timestamp = bin. start . timestamp_millis ( ) ;
301
-
302
+ let counts_start_timestamp = bin. start . timestamp_millis ( ) ;
303
+ let counts_end_timestamp = bin . end . timestamp_millis ( ) ;
302
304
// Sum up the number of rows that fall within the bin
303
305
let log_count: u64 = all_manifest_files
304
306
. iter ( )
@@ -322,7 +324,10 @@ impl CountsRequest {
322
324
. sum ( ) ;
323
325
324
326
counts_records. push ( CountsRecord {
325
- counts_timestamp : DateTime :: from_timestamp_millis ( counts_timestamp)
327
+ counts_start_timestamp : DateTime :: from_timestamp_millis ( counts_start_timestamp)
328
+ . unwrap ( )
329
+ . to_rfc3339 ( ) ,
330
+ counts_end_timestamp : DateTime :: from_timestamp_millis ( counts_end_timestamp)
326
331
. unwrap ( )
327
332
. to_rfc3339 ( ) ,
328
333
log_count,
0 commit comments