Sha256: 847e07f7baa62f8b42ba1fe91175971c2a4aabc7f6c93dbe9ca3e621ae646381
Contents?: true
Size: 720 Bytes
Versions: 3
Compression:
Stored size: 720 Bytes
Contents
#!/usr/bin/env ruby require "cloudstack_client/api" require "benchmark" require "json" GC.disable memory_before = `ps -o rss= -p #{Process.pid}`.to_i/1024 gc_stat_before = GC.stat time = Benchmark.realtime do 100.times do api = CloudstackClient::Api.new command = "listVirtualMachines" api.command_supports_param?(command, "id") api.required_params(command) api.all_required_params?("deployVirtualMachine", { name: "test", templateid: 1 }) end end gc_stat_after = GC.stat memory_after = `ps -o rss= -p #{Process.pid}`.to_i/1024 puts( { time: time.round(2), gc_count: gc_stat_after[:count] - gc_stat_before[:count], memory: "%dM" % (memory_after - memory_before) }.to_json )
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cloudstack_client-1.0.5 | test/benchmark.rb |
cloudstack_client-1.0.4 | test/benchmark.rb |
cloudstack_client-1.0.3 | test/benchmark.rb |