twitter-archive / diffy

Find potential bugs in your services with Diffy
https://twitter.com/diffyproject
Apache License 2.0
3.83k stars 368 forks source link

Feature Request: Support ignoring noisy fields #59

Closed sunnybayz closed 4 years ago

sunnybayz commented 7 years ago

My understanding is that Diffy saves all the responses with differences in memory. In one of our services, the service returns a random UUID in the response. Therefore, when "Exclude Noise" is disabled, it shows 100% diff. When "Exclude Noise" is enabled, it shows very low percentage diff. Diffy frequently runs out of memory because it saves 100% of the responses.

Is it possible to configure Diffy in a way that it simply discard the responses that only differ in noisy fields? That way, it can process much more requests without running out of memory.

Another solution is to support ignoring certain fields for comparison. The ignored fields can be set in command line.

Thanks!

puneetkhanduri commented 7 years ago

Diffy does not save all results in memory - only a subset of samples so that it doesn't run out of memory. Without having access to a heapdump it will be impossible to say what might be causing a memeory leak in your specific case.

sunnybayz commented 7 years ago

That's really good to know! I will try to get a heapdump.

fwz commented 4 years ago

May I know whether Diffy support excluding specific key now? @puneetkhanduri

For example, we have a v1 API, with key 'a' in response. And then we implement a v2 API to add another key 'b' in response. We want to use Diffy to ensure the value of 'a' are exactly the same for both versions.

puneetkhanduri commented 4 years ago

The Diffy UI allows you to manually click and ignore certain keys. This selection exists purely in the UI and has no impact on the Diffy server. Side: Please open future support requests on Opendiffy.