C
Chris Johnson
Hi all,
Just a quick question as I'm not entirely certain what phrase to google for
as all attempts so far have failed to illicit anything useful, and the best
anaology I can think of comes from hardware
I'm curious as to whether there's some form of API in .NET that's the
software equivalent of diagnostic pins on a circuit board? Essentially I'm
want to have a bucket I can throw diagnostic message into in a
fire-and-forget method, and not care whether there's something looking at
the bucket (connected to the pin) or not. If nothing's listening, the
message gets forgotten about.
Ideally it needs to be lightweight with little latency -- the intention is
to use the 'pin' as a performance diagnostic, so in normal situations,
nothing would be connected. If there are problems, then we can attach to the
pin and read timestamp messages. An event queue would be no good: queue
would eventually fill-up and hang the code, unless there was extra logic in
the code to clean the queue up, which could start getting messy. Performance
counters won't really work either as that then requires a large chunk of
logic to keep track of individual entities in order to create an "average
latency" counter.
Essentially it's analogous to attaching an oscilloscope to a circuit board
and looking at the latency of stuff between two pins on a chip, etc.
I suppose shared memory might be one possible solution, but I understand
there's no CLR wrappers for shared memory (excluding third party
extensions). If anyone's got ideas or pointers, I'd be grateful to hear
them.
Cheers,
Chris
Just a quick question as I'm not entirely certain what phrase to google for
as all attempts so far have failed to illicit anything useful, and the best
anaology I can think of comes from hardware
I'm curious as to whether there's some form of API in .NET that's the
software equivalent of diagnostic pins on a circuit board? Essentially I'm
want to have a bucket I can throw diagnostic message into in a
fire-and-forget method, and not care whether there's something looking at
the bucket (connected to the pin) or not. If nothing's listening, the
message gets forgotten about.
Ideally it needs to be lightweight with little latency -- the intention is
to use the 'pin' as a performance diagnostic, so in normal situations,
nothing would be connected. If there are problems, then we can attach to the
pin and read timestamp messages. An event queue would be no good: queue
would eventually fill-up and hang the code, unless there was extra logic in
the code to clean the queue up, which could start getting messy. Performance
counters won't really work either as that then requires a large chunk of
logic to keep track of individual entities in order to create an "average
latency" counter.
Essentially it's analogous to attaching an oscilloscope to a circuit board
and looking at the latency of stuff between two pins on a chip, etc.
I suppose shared memory might be one possible solution, but I understand
there's no CLR wrappers for shared memory (excluding third party
extensions). If anyone's got ideas or pointers, I'd be grateful to hear
them.
Cheers,
Chris