The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #68 from talex5/active-ops

Add Uring.active_ops

authored by

Christiano Haesbaert and committed by
GitHub
534ddc23 4a759a40

+12 -6
+3 -1
lib/uring/uring.ml
··· 515 515 sketch_used sketch_buffer_size sketch_old_buffers 516 516 end 517 517 518 + let active_ops t = Heap.in_use t.data 519 + 518 520 let get_debug_stats t = 519 521 { Stats. 520 522 sqe_ready = Uring.sq_ready t.uring; 521 - active_ops = Heap.in_use t.data; 523 + active_ops = active_ops t; 522 524 sketch_used = t.sketch.off; 523 525 sketch_buffer_size = Bigarray.Array1.dim t.sketch.buffer; 524 526 sketch_old_buffers = List.length t.sketch.old_buffers;
+9 -5
lib/uring/uring.mli
··· 295 295 val error_of_errno : int -> Unix.error 296 296 (** [error_of_errno e] converts the error code [abs e] to a Unix error type. *) 297 297 298 + val active_ops : _ t -> int 299 + (** [active_ops t] returns the number of operations added to the ring (whether submitted or not) 300 + for which the completion event has not yet been collected. *) 301 + 298 302 module Stats : sig 299 303 type t = { 300 - sqe_ready : int; 301 - active_ops : int; 302 - sketch_buffer_size : int; 303 - sketch_used : int; 304 - sketch_old_buffers : int; 304 + sqe_ready : int; (** SQEs not yet submitted. *) 305 + active_ops : int; (** See {!active_ops}. *) 306 + sketch_buffer_size : int; (** Size of the current sketch buffer. *) 307 + sketch_used : int; (** Bytes used within current sketch buffer. *) 308 + sketch_old_buffers : int; (** Old sketch buffers waiting to be freed. *) 305 309 } 306 310 307 311 val pp : t Fmt.t