Skip to content

Suggestion: "Trace" function? #302

@aarondav

Description

@aarondav

For debugging purposes, I was imagining a function that traced how a collection changes over ticks. It would function somewhat similarly to how stdio works now (though shouldn't). The default messaging would be better, though, something like Trace: myTable added these tuples: ["a", "b"], ["c", "d"].

I imagine an interface something like this, with two functions, trace_enter and trace_exit:

  • trace_enter shows updates to a collection at the beginning of ticks. Optimal for interface inputs, to trace when they arrive.
  • trace_exit shows updates the ends of ticks. Optimal for outputs or tables modified during the tick.

These methods maintain the opaqueness of a tick by only instrumenting before or after the tick. Additionally, since a trace would display updates since the last trace on the same object, using both trace_enter and trace_exit would allow you to trace tables that may be used as both inputs and outputs (though that's probably not good coding practice in general).

Any thoughts on this idea? Would it possibly be a worthwhile addition to the bud base support, or just extra garbage on top?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions