there's no code shared between the two, they evolved independently historically, with slightly different goals. They
share the same trace format nowadays, although historically the DevTools performance panel used a different instrumentation and a different format.
The DevTools front-end is specifically tailored to a subset of events emitted by chrome, and has a focus on representing the data in a way that is easy for a web developer to interpret, with plenty of support for the chrome- and devtools-specific entities.
The Catapult trace viewer is meant as a generic trace visualization tool, so it sounds like it would be a better match for your intended use.
Now there's actually a third option, which is perhaps the way to go if you're starting from scratch -- the
Perfetto project is an effort to re-implement tracing, and uses a more efficient protobuf-based binary trace representation. Chrome currently uses perfetto internally and produces the JSON trace format for compatibility with older tools. Perfetto also includes a pretty neat and sophisticated standalone trace viewer.
Hope this helps.
Best regards,
Andrey.