To do some WCF benchmarking, I need to have a way to get the size of the exchanged data(with all header(even TCP)/compression/...).
It's in a bigger benchmarking(which also tries different binding, encoding, ...) so I need to do it programmatically and NOT through something like wireshark.
Is there a hook somewhere to do this?
All channels/bindings/encoders are created programmatically to automate some tests.
I found some ways( http://devlicio.us/blogs/derik_whittaker/archive/2011/02/03/how-to-intercept-a-wcf-message-to-track-message-size.aspx ), but I'm not sure it will work with non-text data. Or http://zamd.net/2008/08/15/calculating-wcf-message-size/ but I don't see how to start it(and not sure it will works with my custom encoders