LCOV - differential code coverage report
Current view: top level - src/backend/access/rmgrdesc - rmgrdesc_utils.c (source / functions) Coverage Total Hit CBC
Current: c3df85756ceb0246958ef2b72c04aba51e52de13 vs 167cb26718e3eae4fef470900b4cd1d434f15649 Lines: 100.0 % 20 20 20
Current Date: 2025-12-18 07:33:40 +0900 Functions: 100.0 % 4 4 4
Baseline: lcov-20251218-005734-baseline Branches: 100.0 % 6 6 6
Baseline Date: 2025-12-17 11:55:04 -0800 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(360..) days: 100.0 % 20 20 20
Function coverage date bins:
(360..) days: 100.0 % 4 4 4
Branch coverage date bins:
(360..) days: 100.0 % 6 6 6

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*-------------------------------------------------------------------------
                                  2                 :                :  *
                                  3                 :                :  * rmgrdesc_utils.c
                                  4                 :                :  *    Support functions for rmgrdesc routines
                                  5                 :                :  *
                                  6                 :                :  * Copyright (c) 2023-2025, PostgreSQL Global Development Group
                                  7                 :                :  *
                                  8                 :                :  *
                                  9                 :                :  * IDENTIFICATION
                                 10                 :                :  *    src/backend/access/rmgrdesc/rmgrdesc_utils.c
                                 11                 :                :  *
                                 12                 :                :  *-------------------------------------------------------------------------
                                 13                 :                :  */
                                 14                 :                : #include "postgres.h"
                                 15                 :                : 
                                 16                 :                : #include "access/rmgrdesc_utils.h"
                                 17                 :                : #include "storage/off.h"
                                 18                 :                : 
                                 19                 :                : /*
                                 20                 :                :  * Helper function to print an array, in the format described in the
                                 21                 :                :  * README.
                                 22                 :                :  */
                                 23                 :                : void
  986 pg@bowt.ie                 24                 :CBC        6242 : array_desc(StringInfo buf, void *array, size_t elem_size, int count,
                                 25                 :                :            void (*elem_desc) (StringInfo buf, void *elem, void *data),
                                 26                 :                :            void *data)
                                 27                 :                : {
                                 28         [ +  + ]:           6242 :     if (count == 0)
                                 29                 :                :     {
                                 30                 :             12 :         appendStringInfoString(buf, " []");
                                 31                 :             12 :         return;
                                 32                 :                :     }
  983                            33                 :           6230 :     appendStringInfoString(buf, " [");
  986                            34         [ +  + ]:          98299 :     for (int i = 0; i < count; i++)
                                 35                 :                :     {
                                 36                 :          92069 :         elem_desc(buf, (char *) array + elem_size * i, data);
  983                            37         [ +  + ]:          92069 :         if (i < count - 1)
                                 38                 :          85839 :             appendStringInfoString(buf, ", ");
                                 39                 :                :     }
  807 drowley@postgresql.o       40                 :           6230 :     appendStringInfoChar(buf, ']');
                                 41                 :                : }
                                 42                 :                : 
                                 43                 :                : void
  986 pg@bowt.ie                 44                 :          90734 : offset_elem_desc(StringInfo buf, void *offset, void *data)
                                 45                 :                : {
                                 46                 :          90734 :     appendStringInfo(buf, "%u", *(OffsetNumber *) offset);
                                 47                 :          90734 : }
                                 48                 :                : 
                                 49                 :                : void
                                 50                 :            681 : redirect_elem_desc(StringInfo buf, void *offset, void *data)
                                 51                 :                : {
                                 52                 :            681 :     OffsetNumber *new_offset = (OffsetNumber *) offset;
                                 53                 :                : 
                                 54                 :            681 :     appendStringInfo(buf, "%u->%u", new_offset[0], new_offset[1]);
                                 55                 :            681 : }
                                 56                 :                : 
                                 57                 :                : void
  983                            58                 :              6 : oid_elem_desc(StringInfo buf, void *relid, void *data)
                                 59                 :                : {
  986                            60                 :              6 :     appendStringInfo(buf, "%u", *(Oid *) relid);
                                 61                 :              6 : }
        

Generated by: LCOV version 2.4-beta