Add TotalSizeBytes to PrefixedEntryRingBuffer

- Added TotalSizeBytes to PrefixedEntryRingBuffer.
- This is needed by users that don't know the size of ring buffer.

Bug: b/242740148
Change-Id: I5b6fc24757d01d38413773a60b5f49666f1dc598
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/107172
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Fateh Singh <fsingh@google.com>
diff --git a/pw_ring_buffer/public/pw_ring_buffer/prefixed_entry_ring_buffer.h b/pw_ring_buffer/public/pw_ring_buffer/prefixed_entry_ring_buffer.h
index e2f2adb..7d9aa0c 100644
--- a/pw_ring_buffer/public/pw_ring_buffer/prefixed_entry_ring_buffer.h
+++ b/pw_ring_buffer/public/pw_ring_buffer/prefixed_entry_ring_buffer.h
@@ -350,6 +350,9 @@
   // including preamble and data chunk.
   size_t TotalUsedBytes() const { return buffer_bytes_ - RawAvailableBytes(); }
 
+  // Returns total size of ring buffer in bytes.
+  size_t TotalSizeBytes() const { return buffer_bytes_; }
+
   // Dering the buffer by reordering entries internally in the buffer by
   // rotating to have the oldest entry is at the lowest address/index with
   // newest entry at the highest address. If no readers are attached, the buffer