{"action":"created","comment":{"url":"https://api.github.com/repos/influxdata/influxdb/pulls/comments/61297643","id":61297643,"diff_hunk":"@@ -0,0 +1,87 @@\n+package statement\n+\n+import (\n+\t\"fmt\"\n+\t\"strings\"\n+\n+\tinflux \"github.com/influxdata/influxdb/client/v2\"\n+\t\"github.com/influxdata/influxdb/stress/v2/ponyExpress\"\n+)\n+\n+// SetStatement set state variables for the test\n+type SetStatement struct {\n+\tVar   string\n+\tValue string\n+\n+\tStatementID string\n+\n+\tTracer *ponyExpress.Tracer\n+}\n+\n+// SetID statisfies the Statement Interface\n+func (i *SetStatement) SetID(s string) {\n+\ti.StatementID = s\n+}\n+\n+// Run statisfies the Statement Interface\n+func (i *SetStatement) Run(s *ponyExpress.StoreFront) {\n+\n+\t// Set the Tracer\n+\ti.Tracer = ponyExpress.NewTracer(make(map[string]string))\n+\n+\t// Create a new Directive\n+\td := ponyExpress.NewDirective(strings.ToLower(i.Var), strings.ToLower(i.Value), i.Tracer)\n+\n+\tswitch d.Property {\n+\n+\t// Needs to be set on both StoreFront and ponyExpress\n+\t// Set the write percison for points generated\n+\tcase \"precision\":\n+\t\ts.Precision = d.Value\n+\n+\t\t// Increment the tracer\n+\t\ti.Tracer.Add(1)\n+\t\ts.SendDirective(d)\n+\n+\t// Lives on StoreFront\n+\t// Set the date for the first point entered into the database\n+\tcase \"startdate\":\n+\t\ts.Lock()\n+\t\tdefer s.Unlock()","path":"stress/v2/statement/set.go","position":50,"original_position":50,"commit_id":"92c5e3828f68f091a384256a35f7cfaa5b28d2fd","original_commit_id":"92c5e3828f68f091a384256a35f7cfaa5b28d2fd","user":{"login":"mark-rushakoff","id":290647,"avatar_url":"https://avatars.githubusercontent.com/u/290647?v=3","gravatar_id":"","url":"https://api.github.com/users/mark-rushakoff","html_url":"https://github.com/mark-rushakoff","followers_url":"https://api.github.com/users/mark-rushakoff/followers","following_url":"https://api.github.com/users/mark-rushakoff/following{/other_user}","gists_url":"https://api.github.com/users/mark-rushakoff/gists{/gist_id}","starred_url":"https://api.github.com/users/mark-rushakoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mark-rushakoff/subscriptions","organizations_url":"https://api.github.com/users/mark-rushakoff/orgs","repos_url":"https://api.github.com/users/mark-rushakoff/repos","events_url":"https://api.github.com/users/mark-rushakoff/events{/privacy}","received_events_url":"https://api.github.com/users/mark-rushakoff/received_events","type":"User","site_admin":false},"body":"These defers are going to \"leak outside the switch\" and not get evaluated until after `i.Tracer.Wait()`. Not sure if that's intended or correct.","created_at":"2016-04-27T17:10:15Z","updated_at":"2016-04-27T17:10:15Z","html_url":"https://github.com/influxdata/influxdb/pull/6443#discussion_r61297643","pull_request_url":"https://api.github.com/repos/influxdata/influxdb/pulls/6443","_links":{"self":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/comments/61297643"},"html":{"href":"https://github.com/influxdata/influxdb/pull/6443#discussion_r61297643"},"pull_request":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/6443"}}},"pull_request":{"url":"https://api.github.com/repos/influxdata/influxdb/pulls/6443","id":67397214,"html_url":"https://github.com/influxdata/influxdb/pull/6443","diff_url":"https://github.com/influxdata/influxdb/pull/6443.diff","patch_url":"https://github.com/influxdata/influxdb/pull/6443.patch","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/6443","number":6443,"state":"open","locked":false,"title":"Add v2 stress test","user":{"login":"jackzampolin","id":7452680,"avatar_url":"https://avatars.githubusercontent.com/u/7452680?v=3","gravatar_id":"","url":"https://api.github.com/users/jackzampolin","html_url":"https://github.com/jackzampolin","followers_url":"https://api.github.com/users/jackzampolin/followers","following_url":"https://api.github.com/users/jackzampolin/following{/other_user}","gists_url":"https://api.github.com/users/jackzampolin/gists{/gist_id}","starred_url":"https://api.github.com/users/jackzampolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackzampolin/subscriptions","organizations_url":"https://api.github.com/users/jackzampolin/orgs","repos_url":"https://api.github.com/users/jackzampolin/repos","events_url":"https://api.github.com/users/jackzampolin/events{/privacy}","received_events_url":"https://api.github.com/users/jackzampolin/received_events","type":"User","site_admin":false},"body":"###### Required for all non-trivial PRs\r\n- [X] Rebased/mergable\r\n- [X] Tests pass\r\n- [ ] CHANGELOG.md updated\r\n- [X] Sign [CLA](https://influxdata.com/community/cla/) (if not already signed)\r\n","created_at":"2016-04-21T18:04:58Z","updated_at":"2016-04-27T17:10:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5d4e88f2747cfdfbee14c5e42b76f2a494b720a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/influxdata/influxdb/pulls/6443/commits","review_comments_url":"https://api.github.com/repos/influxdata/influxdb/pulls/6443/comments","review_comment_url":"https://api.github.com/repos/influxdata/influxdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/6443/comments","statuses_url":"https://api.github.com/repos/influxdata/influxdb/statuses/92c5e3828f68f091a384256a35f7cfaa5b28d2fd","head":{"label":"influxdata:js-new-stress","ref":"js-new-stress","sha":"92c5e3828f68f091a384256a35f7cfaa5b28d2fd","user":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"repo":{"id":13124802,"name":"influxdb","full_name":"influxdata/influxdb","owner":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdata/influxdb","description":"Scalable datastore for metrics, events, and real-time analytics","fork":false,"url":"https://api.github.com/repos/influxdata/influxdb","forks_url":"https://api.github.com/repos/influxdata/influxdb/forks","keys_url":"https://api.github.com/repos/influxdata/influxdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdata/influxdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdata/influxdb/teams","hooks_url":"https://api.github.com/repos/influxdata/influxdb/hooks","issue_events_url":"https://api.github.com/repos/influxdata/influxdb/issues/events{/number}","events_url":"https://api.github.com/repos/influxdata/influxdb/events","assignees_url":"https://api.github.com/repos/influxdata/influxdb/assignees{/user}","branches_url":"https://api.github.com/repos/influxdata/influxdb/branches{/branch}","tags_url":"https://api.github.com/repos/influxdata/influxdb/tags","blobs_url":"https://api.github.com/repos/influxdata/influxdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdata/influxdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdata/influxdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdata/influxdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdata/influxdb/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdata/influxdb/languages","stargazers_url":"https://api.github.com/repos/influxdata/influxdb/stargazers","contributors_url":"https://api.github.com/repos/influxdata/influxdb/contributors","subscribers_url":"https://api.github.com/repos/influxdata/influxdb/subscribers","subscription_url":"https://api.github.com/repos/influxdata/influxdb/subscription","commits_url":"https://api.github.com/repos/influxdata/influxdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdata/influxdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdata/influxdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdata/influxdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdata/influxdb/contents/{+path}","compare_url":"https://api.github.com/repos/influxdata/influxdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdata/influxdb/merges","archive_url":"https://api.github.com/repos/influxdata/influxdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdata/influxdb/downloads","issues_url":"https://api.github.com/repos/influxdata/influxdb/issues{/number}","pulls_url":"https://api.github.com/repos/influxdata/influxdb/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdata/influxdb/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdata/influxdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdata/influxdb/labels{/name}","releases_url":"https://api.github.com/repos/influxdata/influxdb/releases{/id}","deployments_url":"https://api.github.com/repos/influxdata/influxdb/deployments","created_at":"2013-09-26T14:31:10Z","updated_at":"2016-04-27T17:08:10Z","pushed_at":"2016-04-27T16:24:58Z","git_url":"git://github.com/influxdata/influxdb.git","ssh_url":"git@github.com:influxdata/influxdb.git","clone_url":"https://github.com/influxdata/influxdb.git","svn_url":"https://github.com/influxdata/influxdb","homepage":"https://influxdata.com","size":61243,"stargazers_count":7913,"watchers_count":7913,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1057,"mirror_url":null,"open_issues_count":512,"forks":1057,"open_issues":512,"watchers":7913,"default_branch":"master"}},"base":{"label":"influxdata:master","ref":"master","sha":"8c232f311b17f9bd7438801a6b8db10e258ee8b1","user":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"repo":{"id":13124802,"name":"influxdb","full_name":"influxdata/influxdb","owner":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdata/influxdb","description":"Scalable datastore for metrics, events, and real-time analytics","fork":false,"url":"https://api.github.com/repos/influxdata/influxdb","forks_url":"https://api.github.com/repos/influxdata/influxdb/forks","keys_url":"https://api.github.com/repos/influxdata/influxdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdata/influxdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdata/influxdb/teams","hooks_url":"https://api.github.com/repos/influxdata/influxdb/hooks","issue_events_url":"https://api.github.com/repos/influxdata/influxdb/issues/events{/number}","events_url":"https://api.github.com/repos/influxdata/influxdb/events","assignees_url":"https://api.github.com/repos/influxdata/influxdb/assignees{/user}","branches_url":"https://api.github.com/repos/influxdata/influxdb/branches{/branch}","tags_url":"https://api.github.com/repos/influxdata/influxdb/tags","blobs_url":"https://api.github.com/repos/influxdata/influxdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdata/influxdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdata/influxdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdata/influxdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdata/influxdb/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdata/influxdb/languages","stargazers_url":"https://api.github.com/repos/influxdata/influxdb/stargazers","contributors_url":"https://api.github.com/repos/influxdata/influxdb/contributors","subscribers_url":"https://api.github.com/repos/influxdata/influxdb/subscribers","subscription_url":"https://api.github.com/repos/influxdata/influxdb/subscription","commits_url":"https://api.github.com/repos/influxdata/influxdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdata/influxdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdata/influxdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdata/influxdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdata/influxdb/contents/{+path}","compare_url":"https://api.github.com/repos/influxdata/influxdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdata/influxdb/merges","archive_url":"https://api.github.com/repos/influxdata/influxdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdata/influxdb/downloads","issues_url":"https://api.github.com/repos/influxdata/influxdb/issues{/number}","pulls_url":"https://api.github.com/repos/influxdata/influxdb/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdata/influxdb/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdata/influxdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdata/influxdb/labels{/name}","releases_url":"https://api.github.com/repos/influxdata/influxdb/releases{/id}","deployments_url":"https://api.github.com/repos/influxdata/influxdb/deployments","created_at":"2013-09-26T14:31:10Z","updated_at":"2016-04-27T17:08:10Z","pushed_at":"2016-04-27T16:24:58Z","git_url":"git://github.com/influxdata/influxdb.git","ssh_url":"git@github.com:influxdata/influxdb.git","clone_url":"https://github.com/influxdata/influxdb.git","svn_url":"https://github.com/influxdata/influxdb","homepage":"https://influxdata.com","size":61243,"stargazers_count":7913,"watchers_count":7913,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1057,"mirror_url":null,"open_issues_count":512,"forks":1057,"open_issues":512,"watchers":7913,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/6443"},"html":{"href":"https://github.com/influxdata/influxdb/pull/6443"},"issue":{"href":"https://api.github.com/repos/influxdata/influxdb/issues/6443"},"comments":{"href":"https://api.github.com/repos/influxdata/influxdb/issues/6443/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/6443/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/6443/commits"},"statuses":{"href":"https://api.github.com/repos/influxdata/influxdb/statuses/92c5e3828f68f091a384256a35f7cfaa5b28d2fd"}}}}