Skip to content

[CLEAN/DESIGN] Visitor pattern #11

@ethangraham2001

Description

@ethangraham2001

The code is pretty imperative at this stage. Since we are, for every iteration (whether that be in the display loop or when the program is scraped by prometheus) we are consuming all of the data produced by the eBPF programs in the sub-routines (memleak, cudatrace) and updating local state.

For maintainability and extensibility, perhaps it would make sense to model this as a visitor pattern, where visiting a node (in this case a sub-routine) equated to consuming events produced by the kernel, and updating local state.

Defining a Visitor trait and having a separate loop for consuming data (independent of the display and Prometheus export loops) may be a good design decision.

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