{"action":"created","issue":{"url":"https://api.github.com/repos/recurly/recurly-client-ruby/issues/408","repository_url":"https://api.github.com/repos/recurly/recurly-client-ruby","labels_url":"https://api.github.com/repos/recurly/recurly-client-ruby/issues/408/labels{/name}","comments_url":"https://api.github.com/repos/recurly/recurly-client-ruby/issues/408/comments","events_url":"https://api.github.com/repos/recurly/recurly-client-ruby/issues/408/events","html_url":"https://github.com/recurly/recurly-client-ruby/pull/408","id":350229202,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MTMxNTM4","number":408,"title":"Use Net-http-persistent for persistent connection","user":{"login":"bhelx","id":185919,"node_id":"MDQ6VXNlcjE4NTkxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/185919?v=4","gravatar_id":"","url":"https://api.github.com/users/bhelx","html_url":"https://github.com/bhelx","followers_url":"https://api.github.com/users/bhelx/followers","following_url":"https://api.github.com/users/bhelx/following{/other_user}","gists_url":"https://api.github.com/users/bhelx/gists{/gist_id}","starred_url":"https://api.github.com/users/bhelx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhelx/subscriptions","organizations_url":"https://api.github.com/users/bhelx/orgs","repos_url":"https://api.github.com/users/bhelx/repos","events_url":"https://api.github.com/users/bhelx/events{/privacy}","received_events_url":"https://api.github.com/users/bhelx/received_events","type":"User","site_admin":false},"labels":[{"id":1016265716,"node_id":"MDU6TGFiZWwxMDE2MjY1NzE2","url":"https://api.github.com/repos/recurly/recurly-client-ruby/labels/V3","name":"V3","color":"bbed93","default":false},{"id":276686856,"node_id":"MDU6TGFiZWwyNzY2ODY4NTY=","url":"https://api.github.com/repos/recurly/recurly-client-ruby/labels/WIP","name":"WIP","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-13T23:29:11Z","updated_at":"2018-08-14T16:00:27Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/recurly/recurly-client-ruby/pulls/408","html_url":"https://github.com/recurly/recurly-client-ruby/pull/408","diff_url":"https://github.com/recurly/recurly-client-ruby/pull/408.diff","patch_url":"https://github.com/recurly/recurly-client-ruby/pull/408.patch"},"body":"Should discuss some configuration and dependency management here, that's why it's a WIP.\r\n\r\nTested against this script:\r\n\r\n```ruby\r\nrequire 'recurly'\r\nrequire 'benchmark'\r\n\r\nAPI_KEY = 'KEY'\r\nSITE_ID = 'subdomain-SUBDOMAIN'\r\n\r\n@client = Recurly::Client.new(api_key: API_KEY, site_id: SITE_ID)\r\n\r\n# Get first 30 ids\r\nids = @client.list_accounts(limit: 30).each_page.first.map(&:id)\r\n\r\nmeasurement = Benchmark.measure do\r\n  # Fetch 30 accounts\r\n  # Obviously we could use `ids=` in list_accounts but this\r\n  # is unoptimized for benchmarking purposes\r\n  ids.each do |id|\r\n    acct = @client.get_account(account_id: id)\r\n  end\r\nend\r\nputs measurement\r\n```\r\n\r\nWithout persistent:\r\n`0.520000   0.040000   0.560000 ( 11.453849)`\r\nWith persistent:\r\n`  0.390000   0.030000   0.420000 (  4.655093)`\r\n\r\nWith persistent, the wall-clock time is over halved.\r\n"},"comment":{"url":"https://api.github.com/repos/recurly/recurly-client-ruby/issues/comments/412923966","html_url":"https://github.com/recurly/recurly-client-ruby/pull/408#issuecomment-412923966","issue_url":"https://api.github.com/repos/recurly/recurly-client-ruby/issues/408","id":412923966,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjkyMzk2Ng==","user":{"login":"bhelx","id":185919,"node_id":"MDQ6VXNlcjE4NTkxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/185919?v=4","gravatar_id":"","url":"https://api.github.com/users/bhelx","html_url":"https://github.com/bhelx","followers_url":"https://api.github.com/users/bhelx/followers","following_url":"https://api.github.com/users/bhelx/following{/other_user}","gists_url":"https://api.github.com/users/bhelx/gists{/gist_id}","starred_url":"https://api.github.com/users/bhelx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhelx/subscriptions","organizations_url":"https://api.github.com/users/bhelx/orgs","repos_url":"https://api.github.com/users/bhelx/repos","events_url":"https://api.github.com/users/bhelx/events{/privacy}","received_events_url":"https://api.github.com/users/bhelx/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T16:00:27Z","updated_at":"2018-08-14T16:00:27Z","author_association":"MEMBER","body":"Notes: https://github.com/drbrain/net-http-persistent/blob/master/History.txt"}}
{"actor":{"display_login":"bhelx"}}