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

Argument distribution #108

Open
gomoripeti opened this issue Nov 5, 2017 · 0 comments
Open

Argument distribution #108

gomoripeti opened this issue Nov 5, 2017 · 0 comments

Comments

@gomoripeti
Copy link
Collaborator

gomoripeti commented Nov 5, 2017

Instead of plotting latency of a function, plot the distribution of an
argument. Additionally it would be nice to plot a value derived from one or more
arguments. Deriving can happen in the match-spec (limited) or after passing all
the necessary arguments to an arbitrary "derive" fun which could be executed in
the trace handler.

The value

  • int: in the simplest case must be an integer (with a lower and upper bound; default range can be 0..max_duration)
  • enum: or any term with max number of combinations/buckets

Options:

  • aggregation method: histogram (only integer; int) or frequency count (any term, enum)
  • interval: how often to take a snapshot of the collected data (this is hard-coded currently for function latency to 1 second, but could make sense to set larger intervals in this case) (maybe does not need to be implemented)

http://manpages.ubuntu.com/manpages/zesty/man8/argdist-bpfcc.8.html

Query syntax

With the current syntax it would be possible to add extra action function:

mod:fun(_,A,_) -> argdist(A)
mod:fun(_,A,B) -> argdist(A+B)
mod:fun(_,A,_) -> argdist(A >= 0, enum)

Extended syntax:
(multiple lines for readability)

#argdist enum = 2,
    interval = "5sec",
    derive: if A > 0 -> positive; true -> neg_or_zero end,
    mfa = mod:fun(_, A, _)
%Argdist int: -100..100,
    interval: "5sec",
    mfa: Mod.fun(_, a, _)

Prerequisits:

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

No branches or pull requests

1 participant