@@ -27,8 +27,6 @@ fn update_counter(counter: &AtomicU64, delta: u64) {
2727struct CategorySnapshot {
2828 event_count : u64 ,
2929 event_byte_size : u64 ,
30- total_count : u64 ,
31- total_byte_size : u64 ,
3230}
3331
3432impl CategorySnapshot {
@@ -48,17 +46,13 @@ impl CategorySnapshot {
4846struct CategoryMetrics {
4947 event_count : AtomicU64 ,
5048 event_byte_size : AtomicU64 ,
51- total_count : AtomicU64 ,
52- total_byte_size : AtomicU64 ,
5349}
5450
5551impl CategoryMetrics {
5652 /// Increments the event count and byte size by the given amounts.
5753 fn increment ( & self , event_count : u64 , event_byte_size : u64 ) {
5854 update_counter ( & self . event_count , event_count) ;
5955 update_counter ( & self . event_byte_size , event_byte_size) ;
60- update_counter ( & self . total_count , event_count) ;
61- update_counter ( & self . total_byte_size , event_byte_size) ;
6256 }
6357
6458 /// Sets the event count and event byte size to the given amount.
@@ -68,18 +62,13 @@ impl CategoryMetrics {
6862 self . event_count . store ( event_count, Ordering :: Release ) ;
6963 self . event_byte_size
7064 . store ( event_byte_size, Ordering :: Release ) ;
71- self . total_count . store ( event_count, Ordering :: Release ) ;
72- self . total_byte_size
73- . store ( event_byte_size, Ordering :: Release ) ;
7465 }
7566
7667 /// Gets a snapshot of the event count and event byte size.
7768 fn get ( & self ) -> CategorySnapshot {
7869 CategorySnapshot {
7970 event_count : self . event_count . load ( Ordering :: Acquire ) ,
8071 event_byte_size : self . event_byte_size . load ( Ordering :: Acquire ) ,
81- total_count : self . total_count . load ( Ordering :: Acquire ) ,
82- total_byte_size : self . total_byte_size . load ( Ordering :: Acquire ) ,
8372 }
8473 }
8574
@@ -93,8 +82,6 @@ impl CategoryMetrics {
9382 CategorySnapshot {
9483 event_count : self . event_count . swap ( 0 , Ordering :: AcqRel ) ,
9584 event_byte_size : self . event_byte_size . swap ( 0 , Ordering :: AcqRel ) ,
96- total_count : self . total_count . swap ( 0 , Ordering :: AcqRel ) ,
97- total_byte_size : self . total_byte_size . swap ( 0 , Ordering :: AcqRel ) ,
9885 }
9986 }
10087}
@@ -291,8 +278,6 @@ impl BufferUsage {
291278 idx : stage. idx ,
292279 count : received. event_count ,
293280 byte_size : received. event_byte_size ,
294- total_count : received. total_count ,
295- total_byte_size : received. total_byte_size ,
296281 } ) ;
297282 }
298283
@@ -303,8 +288,6 @@ impl BufferUsage {
303288 idx : stage. idx ,
304289 count : sent. event_count ,
305290 byte_size : sent. event_byte_size ,
306- total_count : sent. total_count ,
307- total_byte_size : sent. total_byte_size ,
308291 } ) ;
309292 }
310293
@@ -317,8 +300,6 @@ impl BufferUsage {
317300 reason : "corrupted_events" ,
318301 count : dropped. event_count ,
319302 byte_size : dropped. event_byte_size ,
320- total_count : dropped. total_count ,
321- total_byte_size : dropped. total_byte_size ,
322303 } ) ;
323304 }
324305
@@ -331,8 +312,6 @@ impl BufferUsage {
331312 reason : "drop_newest" ,
332313 count : dropped_intentional. event_count ,
333314 byte_size : dropped_intentional. event_byte_size ,
334- total_count : dropped_intentional. total_count ,
335- total_byte_size : dropped_intentional. total_byte_size ,
336315 } ) ;
337316 }
338317 }
0 commit comments