I tried the tool (very useful!) but experienced some issues querying our large tracking database (prod system). I eventually had to download the code and make a few modifications to get it to work.
The SqlOrchTrackingShapeMetrics.txt file
To avoid the Artithmetic errors: change AVG(cast(Duration)
to cast(AVG(cast(Duration as bigint)) as int)
Add/change the sqlcommand timeout setting: cmd.CommandTimeout = 300;
Hopefully you can apply these fixes to the codebase.