Skip to content

Rename fps to fpsMonitor and .fps() to .value() #248

Description

@vs-borodin

Which @signality/* package(s) are relevant/related to the feature request?

core

Description

fps() is named after the metric, but it returns a controller (isRunning / start() / stop()), not a value.

The result is a stutter at every call site: fpsMonitor.fps(). Other core utilities that carry a single primary value expose it as value (cva, queryParams), so fps is also inconsistent with the rest of the API.

Proposed solution

Rename to match how the utility is actually used, with a temporary deprecation window instead of a hard break.

New API:

import { fpsMonitor } from '@signality/core';

readonly monitor = fpsMonitor();
// monitor.value()      (was monitor.fps())
// monitor.isRunning()
// monitor.start() / monitor.stop()

Renames:

Before After
fps() fpsMonitor()
FpsRef.fps FpsMonitorRef.value
FpsOptions / FpsRef FpsMonitorOptions / FpsMonitorRef
FPS token FPS_MONITOR
@signality/core/browser/fps @signality/core/browser/fps-monitor
docs /browser/fps docs /browser/fps-monitor

Alternatives considered

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions