shared_diagnostics: Get diagnostics for a shared vector

View source: R/altrep.R

shared_diagnosticsR Documentation

Get diagnostics for a shared vector

Description

Get diagnostics for a shared vector

Usage

shared_diagnostics(x)

Arguments

x

A shard ALTREP vector

Value

A list with diagnostic information:

dataptr_calls

Number of times DATAPTR was accessed

materialize_calls

Number of times vector was copied to standard R vector

length

Number of elements

offset

Byte offset into underlying segment

readonly

Whether write access is prevented

type

R type of the vector

Examples


seg <- segment_create(400)
segment_write(seg, 1:100, offset = 0)
x <- shared_vector(seg, "integer", length = 100)

sum(x)

shared_diagnostics(x)


shard documentation built on April 3, 2026, 9:08 a.m.