I have a class named ProfileData. earlier we used to serialize and deserialize each ProfileData object in a separate file. Now we have a feature where we need to compare two ProfileData objects and store the comparison in another file.
Here profile data consists of profiling info for an application. i.e stats on cpu time for methods classes, package etc.
ProfileData has an array ProfileSample, ProfileSample have an array of StackEntry, each StackEntry has a FunctionData class. Function data has info abt name, package, class, line etc.
Noe can somebody help me in implementing a suitable design for ProfileComparison class which should contain the ProfileData objects compared and data rekated to comparison result. I want to reuse the existing code to the max. Which design pattern would be suitable to this or any better idea to acheive this