Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hog): save function telemetry #25093

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mariusandra
Copy link
Collaborator

@mariusandra mariusandra commented Sep 19, 2024

Problem

Some functions take a lot of time and we want to know why.

Changes

Adds an option telemetry: true, that returns some data if set. The data returned is an array of:

export type Telemetry = [
    /** Time from epoch in milliseconds */
    number,
    /** Current chunk */
    string,
    /** Current position in chunk */
    number,
    /** Opcode */
    number
]

We can add more verbosity in a followup. For now the idea is to see what op exactly takes this long.

The result will be hard to read, but should be fine if I port the Python --debug mode to JS... and create a great experience around debugging but that's for another day.

How did you test this code?

Added a test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant