LCOV - code coverage report
Current view: top level - pebble/internal/invariants - utils.go (source / functions) Hit Total Coverage
Test: 2024-07-25 08:16Z 2752abb9 - tests only.lcov Lines: 3 3 100.0 %
Date: 2024-07-25 08:17:11 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 invariants
       6             : 
       7             : import "github.com/cockroachdb/pebble/internal/fastrand"
       8             : 
       9             : // Sometimes returns true percent% of the time if we were built with the
      10             : // "invariants" of "race" build tags
      11           1 : func Sometimes(percent int) bool {
      12           1 :         return Enabled && fastrand.Uint32()%100 < uint32(percent)
      13           1 : }

Generated by: LCOV version 1.14