{"action":"created","issue":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1558","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1558/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1558/comments","events_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1558/events","html_url":"https://github.com/puppetlabs/puppetdb/pull/1558","id":96923755,"number":1558,"title":"(PDB-1313) Add statistics to puppetdb.commands","user":{"login":"rbrw","id":10120698,"avatar_url":"https://avatars.githubusercontent.com/u/10120698?v=3","gravatar_id":"","url":"https://api.github.com/users/rbrw","html_url":"https://github.com/rbrw","followers_url":"https://api.github.com/users/rbrw/followers","following_url":"https://api.github.com/users/rbrw/following{/other_user}","gists_url":"https://api.github.com/users/rbrw/gists{/gist_id}","starred_url":"https://api.github.com/users/rbrw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbrw/subscriptions","organizations_url":"https://api.github.com/users/rbrw/orgs","repos_url":"https://api.github.com/users/rbrw/repos","events_url":"https://api.github.com/users/rbrw/events{/privacy}","received_events_url":"https://api.github.com/users/rbrw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-23T23:11:00Z","updated_at":"2015-07-27T22:48:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1558","html_url":"https://github.com/puppetlabs/puppetdb/pull/1558","diff_url":"https://github.com/puppetlabs/puppetdb/pull/1558.diff","patch_url":"https://github.com/puppetlabs/puppetdb/pull/1558.patch"},"body":"Arrange for all command submission and execution to go through the\r\ncommand-service, so that it can track received and executed command\r\ncounts.  This makes it possible to know that all outstanding commands\r\nhave been executed by waiting until:\r\n\r\n```clojure\r\n  (let [{:keys [received-commands executed-commands]} (stats cmd-service)]\r\n    (= executed-commands received-commands))\r\n```\r\n\r\nTo make that possible, add a PuppetDBCommandDispatcher protocol for\r\ncommand-service that provides enqueue-command, enqueue-raw-command, and\r\nstats, and make the previous enqueue-command! and enqueue-raw-command!\r\nfunctions private.  Ensure that all command submissions and executions\r\nupdate the new stats."},"comment":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/comments/125372298","html_url":"https://github.com/puppetlabs/puppetdb/pull/1558#issuecomment-125372298","issue_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1558","id":125372298,"user":{"login":"mullr","id":24409,"avatar_url":"https://avatars.githubusercontent.com/u/24409?v=3","gravatar_id":"","url":"https://api.github.com/users/mullr","html_url":"https://github.com/mullr","followers_url":"https://api.github.com/users/mullr/followers","following_url":"https://api.github.com/users/mullr/following{/other_user}","gists_url":"https://api.github.com/users/mullr/gists{/gist_id}","starred_url":"https://api.github.com/users/mullr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mullr/subscriptions","organizations_url":"https://api.github.com/users/mullr/orgs","repos_url":"https://api.github.com/users/mullr/repos","events_url":"https://api.github.com/users/mullr/events{/privacy}","received_events_url":"https://api.github.com/users/mullr/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T22:48:56Z","updated_at":"2015-07-27T22:48:56Z","body":"lgtm, will merge after acceptance tests are green"}}