LCOV - code coverage report
Current view: top level - pebble/batchrepr/batchrepr - writer.go (source / functions) Coverage Total Hit
Test: 2025-07-10 08:18Z dd0f8384 - tests + meta.lcov Lines: 100.0 % 6 6
Test Date: 2025-07-10 08:20:26 Functions: - 0 0

            Line data    Source code
       1              : // Copyright 2024 The LevelDB-Go and Pebble Authors. All rights reserved. Use
       2              : // of this source code is governed by a BSD-style license that can be found in
       3              : // the LICENSE file.
       4              : 
       5              : package batchrepr
       6              : 
       7              : import (
       8              :         "encoding/binary"
       9              : 
      10              :         "github.com/cockroachdb/pebble/internal/base"
      11              : )
      12              : 
      13              : // SetSeqNum mutates the provided batch representation, storing the provided
      14              : // sequence number in its header. The provided byte slice must already be at
      15              : // least HeaderLen bytes long or else SetSeqNum will panic.
      16            2 : func SetSeqNum(repr []byte, seqNum base.SeqNum) {
      17            2 :         binary.LittleEndian.PutUint64(repr[:countOffset], uint64(seqNum))
      18            2 : }
      19              : 
      20              : // SetCount mutates the provided batch representation, storing the provided
      21              : // count in its header. The provided byte slice must already be at least
      22              : // HeaderLen bytes long or else SetCount will panic.
      23            2 : func SetCount(repr []byte, count uint32) {
      24            2 :         binary.LittleEndian.PutUint32(repr[countOffset:HeaderLen], count)
      25            2 : }
        

Generated by: LCOV version 2.0-1