{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/osquery/issues/1673","labels_url":"https://api.github.com/repos/facebook/osquery/issues/1673/labels{/name}","comments_url":"https://api.github.com/repos/facebook/osquery/issues/1673/comments","events_url":"https://api.github.com/repos/facebook/osquery/issues/1673/events","html_url":"https://github.com/facebook/osquery/pull/1673","id":118238784,"number":1673,"title":"[#1527] Add a --profile option to the shell, replace 'run'","user":{"login":"theopolis","id":981645,"avatar_url":"https://avatars.githubusercontent.com/u/981645?v=3","gravatar_id":"","url":"https://api.github.com/users/theopolis","html_url":"https://github.com/theopolis","followers_url":"https://api.github.com/users/theopolis/followers","following_url":"https://api.github.com/users/theopolis/following{/other_user}","gists_url":"https://api.github.com/users/theopolis/gists{/gist_id}","starred_url":"https://api.github.com/users/theopolis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theopolis/subscriptions","organizations_url":"https://api.github.com/users/theopolis/orgs","repos_url":"https://api.github.com/users/theopolis/repos","events_url":"https://api.github.com/users/theopolis/events{/privacy}","received_events_url":"https://api.github.com/users/theopolis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/osquery/labels/build/test%20infrastructure","name":"build/test infrastructure","color":"bfd4f2"},{"url":"https://api.github.com/repos/facebook/osquery/labels/CLA%20Signed","name":"CLA Signed","color":"009900"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-22T04:39:16Z","updated_at":"2015-11-22T20:51:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/osquery/pulls/1673","html_url":"https://github.com/facebook/osquery/pull/1673","diff_url":"https://github.com/facebook/osquery/pull/1673.diff","patch_url":"https://github.com/facebook/osquery/pull/1673.patch"},"body":"This adds a `--profile` option to the shell that silently runs the input query(ies). This should be used in combination with the `./tools/profile.py` wrapper to turn the output into usable form. This python script can provide colored stdout or JSON output. It can also detect/report memory leaks.\r\n\r\nThe profiling functionality used to exist in a smaller/standalone \"runner\" binary that was not shipped with packages. That is no longer needed and the small implementation had been removed."},"comment":{"url":"https://api.github.com/repos/facebook/osquery/issues/comments/158798709","html_url":"https://github.com/facebook/osquery/pull/1673#issuecomment-158798709","issue_url":"https://api.github.com/repos/facebook/osquery/issues/1673","id":158798709,"user":{"login":"sharvilshah","id":819943,"avatar_url":"https://avatars.githubusercontent.com/u/819943?v=3","gravatar_id":"","url":"https://api.github.com/users/sharvilshah","html_url":"https://github.com/sharvilshah","followers_url":"https://api.github.com/users/sharvilshah/followers","following_url":"https://api.github.com/users/sharvilshah/following{/other_user}","gists_url":"https://api.github.com/users/sharvilshah/gists{/gist_id}","starred_url":"https://api.github.com/users/sharvilshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharvilshah/subscriptions","organizations_url":"https://api.github.com/users/sharvilshah/orgs","repos_url":"https://api.github.com/users/sharvilshah/repos","events_url":"https://api.github.com/users/sharvilshah/events{/privacy}","received_events_url":"https://api.github.com/users/sharvilshah/received_events","type":"User","site_admin":false},"created_at":"2015-11-22T20:51:23Z","updated_at":"2015-11-22T20:51:23Z","body":"Is the plan to ship `profile.py` (valgrind/leaks wrapper) alongside the binaries?\r\nSorry for the dumb question, I got excited as I thought that we would embed a profiler. By that I mean either using valgrind or the like as a library, or implementing our own if that's not possible and started looking at how profilers work (although not the best use of my time, super interesting).\r\n\r\n"}}