views:

13

answers:

1

I've been using Shark to benchmark a (very large) application and have a set of features I drill down into each time (e.g., focus on one function and remove stacks with particular others to determine the milliseconds for a particular feature on that run). So far, so good.

I'd like to write a script that takes in a bunch of shark session files and outputs the results of these queries for each file: is there a way to programmatically interact with Shark, or perhaps a way to understand the session log format?

Thanks!

A: 

I think this will be tricky unless you can reverse-engineer the Shark data files. The only other possibility I can think of is to export the profiles as text and manipulate these (obviously only works if there's enough info in the exported text to do what you need to do.)

I would also suggest asking the question again on Apple's PerfOptimization-dev mailing list ([email protected]) - there are a number of Apple engineers on that list who can usually come up with good advice when it comes to performance and the Apple CHUD tools etc.

Paul R
Tried both before posting here; no luck. Thinking I might try to use dtrace for something similar. Sad, yet another case of proprietary-ness getting in the way :(
leo