Sha256: 5a39fd60ff9b32215a0155c58a6a32937ccf842c7b51ef43807c7b892b8b5af0
Contents?: true
Size: 761 Bytes
Versions: 17
Compression:
Stored size: 761 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( JSON.generate( { time: time.round(2), gc_count: gc_stat_after[:count] - gc_stat_before[:count], memory: "%dM" % (memory_after - memory_before) }, pretty: true ) )
Version data entries
17 entries across 17 versions & 1 rubygems