This has been discussed in other threads (https://communities.netapp.com/thread/1405). I have been teaching myself Ruby and have found that no matter how I try to pass arguments to perf-object-get-instances it will always ignore the counters and instances arguements. For instance, when looking at aggregate performance I have been trying to get the API to return on the total_transfers counter on one aggregate. The following snippet will restrict the output to aggr0, but returns all the counters for that aggregate.
The invoke method doesn't take array inputs. Please use zexplorer for testing and code generation. Also the example perf_operatioin.rb in the SDK code example directory is helpful. In the meantime, the code below should help.