ElixirScope.Core.StateManager (elixir_scope v0.0.1)

Manages process state history and temporal queries.

Provides functionality for tracking GenServer state changes over time and reconstructing state at specific timestamps. This module will be enhanced in future iterations to provide full state reconstruction capabilities.

Summary

Functions

Reconstructs the state of a GenServer at a specific timestamp.

Gets the state history for a GenServer process.

Gets state tracking statistics.

Checks if state tracking is available for a given process.

Functions

get_state_at(pid, timestamp)

@spec get_state_at(pid(), integer()) :: {:ok, term()} | {:error, term()}

Reconstructs the state of a GenServer at a specific timestamp.

Currently returns a not implemented error. This will be enhanced in future iterations to provide actual state reconstruction.

get_state_history(pid)

@spec get_state_history(pid()) :: {:ok, [map()]} | {:error, term()}

Gets the state history for a GenServer process.

Currently returns a not implemented error. This will be enhanced in future iterations to provide actual state history tracking.

get_statistics()

@spec get_statistics() :: {:ok, map()} | {:error, term()}

Gets state tracking statistics.

Returns information about how many processes are being tracked, storage usage, etc.

has_state_history?(pid)

@spec has_state_history?(pid()) :: boolean()

Checks if state tracking is available for a given process.

This is a utility function to determine if we have state history data for a specific process.