Brian Utterback
2010-12-17 20:44:00 UTC
I am aggregating using the stack function as the index:
@s[stack()] = count();
This works great. However, I found that in addition to how many times
each stack appears, it would also be useful to know which stacks were
called shortly before the script exited. So I thought to make an
associative array with the same indexes, and store the timestamp the
last time they were set:
ts[stack()] = timestamp;
This gives me an error:
tracing function stack( ) may not be called from a D expression (D
program context required)
Why can't I use stack as the index to an associative array when I can
use it as the index to an aggregation? Am I doing something wrong? And
if I can't use it, does anyone have a suggestion how to store the time
of the last call of each stack?
@s[stack()] = count();
This works great. However, I found that in addition to how many times
each stack appears, it would also be useful to know which stacks were
called shortly before the script exited. So I thought to make an
associative array with the same indexes, and store the timestamp the
last time they were set:
ts[stack()] = timestamp;
This gives me an error:
tracing function stack( ) may not be called from a D expression (D
program context required)
Why can't I use stack as the index to an associative array when I can
use it as the index to an aggregation? Am I doing something wrong? And
if I can't use it, does anyone have a suggestion how to store the time
of the last call of each stack?
--
blu
It's bad civic hygiene to build technologies that could someday be
used to facilitate a police state. - Bruce Schneier
-----------------------------------------------------------------------|
Brian Utterback - Solaris RPE, Oracle Corporation.
Ph:603-262-3916, Em:brian.utterback-QHcLZuEGTsvQT0dZR+***@public.gmane.org
blu
It's bad civic hygiene to build technologies that could someday be
used to facilitate a police state. - Bruce Schneier
-----------------------------------------------------------------------|
Brian Utterback - Solaris RPE, Oracle Corporation.
Ph:603-262-3916, Em:brian.utterback-QHcLZuEGTsvQT0dZR+***@public.gmane.org