'gRPC C# - How do disable compression or caching completely?

I have a gRPC channel where both the client and server are implemented in C#.

I want to test the network delay it takes to send maximum size messages (4MB) from the client to the server, and I get very inconsistent results.

I want to disable any optimization gRPC has on the channel - compression, caching, etc. to get the "delay" and then compare it to the optimized delay.

There are excerpts of solutions of how to enable compression spread in several questions but it isn't clear how to disable compression in both client and server side, or how to disable other channel optimizations.

How do I disable any channel optimization in C# code?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source