{"action":"created","comment":{"url":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/comments/41077728","id":41077728,"diff_hunk":"@@ -835,6 +916,48 @@ public void run()\n       }\n     }\n \n+    //run warmup threads\n+    int warmupopcount = Integer.parseInt(props.getProperty(WARMUP_OPERATION_COUNT_PROPERTY, \"0\"));\n+    int warmupexectime = Integer.parseInt(props.getProperty(WARMUP_EXECUTION_TIME, \"0\"));\n+\n+    if(dotransactions && (warmupopcount > 0 || warmupexectime > 0))\n+    {\n+      System.err.println(\"Starting warmup the datastore...\");\n+      CountDownLatch warmupLatch=new CountDownLatch(threadcount);\n+      List<WarmupThread> warmupThreads = new ArrayList<WarmupThread>();\n+      for (int threadid = 0; threadid < threadcount; threadid++)\n+      {\n+        DB db = null;\n+        try\n+        {\n+          db = DBFactory.newDB(dbname, props);\n+        } catch (UnknownDBException e)\n+        {\n+          System.out.println(\"Unknown DB \" + dbname);\n+          System.exit(0);\n+        }\n+        int operations_perthread = warmupopcount / threadcount;\n+        if (threadid < (warmupopcount % threadcount))\n+        {\n+          ++operations_perthread;\n+        }\n+        WarmupThread t = new WarmupThread(db, dotransactions, workload, props,\n+                operations_perthread, targetperthreadperms, warmupLatch, warmupexectime);\n+        warmupThreads.add(t);\n+      }\n+      for (Thread t : warmupThreads)\n+      {\n+        t.start();\n+      }\n+      try {\n+        warmupLatch.await();\n+      } catch (InterruptedException e) {\n+        e.printStackTrace();","path":"core/src/main/java/com/yahoo/ycsb/Client.java","position":135,"original_position":135,"commit_id":"c12c6f5e20c7c7ec49e16019a2436c8e7948744e","original_commit_id":"c12c6f5e20c7c7ec49e16019a2436c8e7948744e","user":{"login":"cmccoy","id":564884,"avatar_url":"https://avatars.githubusercontent.com/u/564884?v=3","gravatar_id":"","url":"https://api.github.com/users/cmccoy","html_url":"https://github.com/cmccoy","followers_url":"https://api.github.com/users/cmccoy/followers","following_url":"https://api.github.com/users/cmccoy/following{/other_user}","gists_url":"https://api.github.com/users/cmccoy/gists{/gist_id}","starred_url":"https://api.github.com/users/cmccoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmccoy/subscriptions","organizations_url":"https://api.github.com/users/cmccoy/orgs","repos_url":"https://api.github.com/users/cmccoy/repos","events_url":"https://api.github.com/users/cmccoy/events{/privacy}","received_events_url":"https://api.github.com/users/cmccoy/received_events","type":"User","site_admin":false},"body":"Is swallowing this exception intentional?","created_at":"2015-10-02T23:18:50Z","updated_at":"2015-10-02T23:18:50Z","html_url":"https://github.com/brianfrankcooper/YCSB/pull/423#discussion_r41077728","pull_request_url":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/423","_links":{"self":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/comments/41077728"},"html":{"href":"https://github.com/brianfrankcooper/YCSB/pull/423#discussion_r41077728"},"pull_request":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/423"}}},"pull_request":{"url":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/423","id":46601338,"html_url":"https://github.com/brianfrankcooper/YCSB/pull/423","diff_url":"https://github.com/brianfrankcooper/YCSB/pull/423.diff","patch_url":"https://github.com/brianfrankcooper/YCSB/pull/423.patch","issue_url":"https://api.github.com/repos/brianfrankcooper/YCSB/issues/423","number":423,"state":"open","locked":false,"title":"Add warmup phase before starting the measurement","user":{"login":"Thomas-Yang","id":7577237,"avatar_url":"https://avatars.githubusercontent.com/u/7577237?v=3","gravatar_id":"","url":"https://api.github.com/users/Thomas-Yang","html_url":"https://github.com/Thomas-Yang","followers_url":"https://api.github.com/users/Thomas-Yang/followers","following_url":"https://api.github.com/users/Thomas-Yang/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-Yang/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-Yang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-Yang/subscriptions","organizations_url":"https://api.github.com/users/Thomas-Yang/orgs","repos_url":"https://api.github.com/users/Thomas-Yang/repos","events_url":"https://api.github.com/users/Thomas-Yang/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-Yang/received_events","type":"User","site_admin":false},"body":"Allow to warmup the backend datastores before collecting the latency/throughput measurements. The length of the warmup phase is configurable by the number of operations and expected execution time. Reference PR #121 and close #422.","created_at":"2015-10-02T03:56:26Z","updated_at":"2015-10-02T23:18:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"154882c83bb38884f5750ab1805ad95fa1970925","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/423/commits","review_comments_url":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/423/comments","review_comment_url":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brianfrankcooper/YCSB/issues/423/comments","statuses_url":"https://api.github.com/repos/brianfrankcooper/YCSB/statuses/c12c6f5e20c7c7ec49e16019a2436c8e7948744e","head":{"label":"Thomas-Yang:warmup-phase","ref":"warmup-phase","sha":"c12c6f5e20c7c7ec49e16019a2436c8e7948744e","user":{"login":"Thomas-Yang","id":7577237,"avatar_url":"https://avatars.githubusercontent.com/u/7577237?v=3","gravatar_id":"","url":"https://api.github.com/users/Thomas-Yang","html_url":"https://github.com/Thomas-Yang","followers_url":"https://api.github.com/users/Thomas-Yang/followers","following_url":"https://api.github.com/users/Thomas-Yang/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-Yang/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-Yang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-Yang/subscriptions","organizations_url":"https://api.github.com/users/Thomas-Yang/orgs","repos_url":"https://api.github.com/users/Thomas-Yang/repos","events_url":"https://api.github.com/users/Thomas-Yang/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-Yang/received_events","type":"User","site_admin":false},"repo":{"id":43320877,"name":"YCSB","full_name":"Thomas-Yang/YCSB","owner":{"login":"Thomas-Yang","id":7577237,"avatar_url":"https://avatars.githubusercontent.com/u/7577237?v=3","gravatar_id":"","url":"https://api.github.com/users/Thomas-Yang","html_url":"https://github.com/Thomas-Yang","followers_url":"https://api.github.com/users/Thomas-Yang/followers","following_url":"https://api.github.com/users/Thomas-Yang/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-Yang/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-Yang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-Yang/subscriptions","organizations_url":"https://api.github.com/users/Thomas-Yang/orgs","repos_url":"https://api.github.com/users/Thomas-Yang/repos","events_url":"https://api.github.com/users/Thomas-Yang/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-Yang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Thomas-Yang/YCSB","description":"Yahoo! Cloud Serving Benchmark","fork":true,"url":"https://api.github.com/repos/Thomas-Yang/YCSB","forks_url":"https://api.github.com/repos/Thomas-Yang/YCSB/forks","keys_url":"https://api.github.com/repos/Thomas-Yang/YCSB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Thomas-Yang/YCSB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Thomas-Yang/YCSB/teams","hooks_url":"https://api.github.com/repos/Thomas-Yang/YCSB/hooks","issue_events_url":"https://api.github.com/repos/Thomas-Yang/YCSB/issues/events{/number}","events_url":"https://api.github.com/repos/Thomas-Yang/YCSB/events","assignees_url":"https://api.github.com/repos/Thomas-Yang/YCSB/assignees{/user}","branches_url":"https://api.github.com/repos/Thomas-Yang/YCSB/branches{/branch}","tags_url":"https://api.github.com/repos/Thomas-Yang/YCSB/tags","blobs_url":"https://api.github.com/repos/Thomas-Yang/YCSB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Thomas-Yang/YCSB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Thomas-Yang/YCSB/git/refs{/sha}","trees_url":"https://api.github.com/repos/Thomas-Yang/YCSB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Thomas-Yang/YCSB/statuses/{sha}","languages_url":"https://api.github.com/repos/Thomas-Yang/YCSB/languages","stargazers_url":"https://api.github.com/repos/Thomas-Yang/YCSB/stargazers","contributors_url":"https://api.github.com/repos/Thomas-Yang/YCSB/contributors","subscribers_url":"https://api.github.com/repos/Thomas-Yang/YCSB/subscribers","subscription_url":"https://api.github.com/repos/Thomas-Yang/YCSB/subscription","commits_url":"https://api.github.com/repos/Thomas-Yang/YCSB/commits{/sha}","git_commits_url":"https://api.github.com/repos/Thomas-Yang/YCSB/git/commits{/sha}","comments_url":"https://api.github.com/repos/Thomas-Yang/YCSB/comments{/number}","issue_comment_url":"https://api.github.com/repos/Thomas-Yang/YCSB/issues/comments{/number}","contents_url":"https://api.github.com/repos/Thomas-Yang/YCSB/contents/{+path}","compare_url":"https://api.github.com/repos/Thomas-Yang/YCSB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Thomas-Yang/YCSB/merges","archive_url":"https://api.github.com/repos/Thomas-Yang/YCSB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Thomas-Yang/YCSB/downloads","issues_url":"https://api.github.com/repos/Thomas-Yang/YCSB/issues{/number}","pulls_url":"https://api.github.com/repos/Thomas-Yang/YCSB/pulls{/number}","milestones_url":"https://api.github.com/repos/Thomas-Yang/YCSB/milestones{/number}","notifications_url":"https://api.github.com/repos/Thomas-Yang/YCSB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Thomas-Yang/YCSB/labels{/name}","releases_url":"https://api.github.com/repos/Thomas-Yang/YCSB/releases{/id}","created_at":"2015-09-28T19:05:37Z","updated_at":"2015-09-28T19:05:39Z","pushed_at":"2015-10-02T03:33:08Z","git_url":"git://github.com/Thomas-Yang/YCSB.git","ssh_url":"git@github.com:Thomas-Yang/YCSB.git","clone_url":"https://github.com/Thomas-Yang/YCSB.git","svn_url":"https://github.com/Thomas-Yang/YCSB","homepage":"http://research.yahoo.com/Web_Information_Management/YCSB","size":176970,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"brianfrankcooper:master","ref":"master","sha":"0cda72e780c6eee941718c8ff6295f94aad7e91a","user":{"login":"brianfrankcooper","id":247619,"avatar_url":"https://avatars.githubusercontent.com/u/247619?v=3","gravatar_id":"","url":"https://api.github.com/users/brianfrankcooper","html_url":"https://github.com/brianfrankcooper","followers_url":"https://api.github.com/users/brianfrankcooper/followers","following_url":"https://api.github.com/users/brianfrankcooper/following{/other_user}","gists_url":"https://api.github.com/users/brianfrankcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/brianfrankcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianfrankcooper/subscriptions","organizations_url":"https://api.github.com/users/brianfrankcooper/orgs","repos_url":"https://api.github.com/users/brianfrankcooper/repos","events_url":"https://api.github.com/users/brianfrankcooper/events{/privacy}","received_events_url":"https://api.github.com/users/brianfrankcooper/received_events","type":"User","site_admin":false},"repo":{"id":618492,"name":"YCSB","full_name":"brianfrankcooper/YCSB","owner":{"login":"brianfrankcooper","id":247619,"avatar_url":"https://avatars.githubusercontent.com/u/247619?v=3","gravatar_id":"","url":"https://api.github.com/users/brianfrankcooper","html_url":"https://github.com/brianfrankcooper","followers_url":"https://api.github.com/users/brianfrankcooper/followers","following_url":"https://api.github.com/users/brianfrankcooper/following{/other_user}","gists_url":"https://api.github.com/users/brianfrankcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/brianfrankcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianfrankcooper/subscriptions","organizations_url":"https://api.github.com/users/brianfrankcooper/orgs","repos_url":"https://api.github.com/users/brianfrankcooper/repos","events_url":"https://api.github.com/users/brianfrankcooper/events{/privacy}","received_events_url":"https://api.github.com/users/brianfrankcooper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brianfrankcooper/YCSB","description":"Yahoo! Cloud Serving Benchmark","fork":false,"url":"https://api.github.com/repos/brianfrankcooper/YCSB","forks_url":"https://api.github.com/repos/brianfrankcooper/YCSB/forks","keys_url":"https://api.github.com/repos/brianfrankcooper/YCSB/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brianfrankcooper/YCSB/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brianfrankcooper/YCSB/teams","hooks_url":"https://api.github.com/repos/brianfrankcooper/YCSB/hooks","issue_events_url":"https://api.github.com/repos/brianfrankcooper/YCSB/issues/events{/number}","events_url":"https://api.github.com/repos/brianfrankcooper/YCSB/events","assignees_url":"https://api.github.com/repos/brianfrankcooper/YCSB/assignees{/user}","branches_url":"https://api.github.com/repos/brianfrankcooper/YCSB/branches{/branch}","tags_url":"https://api.github.com/repos/brianfrankcooper/YCSB/tags","blobs_url":"https://api.github.com/repos/brianfrankcooper/YCSB/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brianfrankcooper/YCSB/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brianfrankcooper/YCSB/git/refs{/sha}","trees_url":"https://api.github.com/repos/brianfrankcooper/YCSB/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brianfrankcooper/YCSB/statuses/{sha}","languages_url":"https://api.github.com/repos/brianfrankcooper/YCSB/languages","stargazers_url":"https://api.github.com/repos/brianfrankcooper/YCSB/stargazers","contributors_url":"https://api.github.com/repos/brianfrankcooper/YCSB/contributors","subscribers_url":"https://api.github.com/repos/brianfrankcooper/YCSB/subscribers","subscription_url":"https://api.github.com/repos/brianfrankcooper/YCSB/subscription","commits_url":"https://api.github.com/repos/brianfrankcooper/YCSB/commits{/sha}","git_commits_url":"https://api.github.com/repos/brianfrankcooper/YCSB/git/commits{/sha}","comments_url":"https://api.github.com/repos/brianfrankcooper/YCSB/comments{/number}","issue_comment_url":"https://api.github.com/repos/brianfrankcooper/YCSB/issues/comments{/number}","contents_url":"https://api.github.com/repos/brianfrankcooper/YCSB/contents/{+path}","compare_url":"https://api.github.com/repos/brianfrankcooper/YCSB/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brianfrankcooper/YCSB/merges","archive_url":"https://api.github.com/repos/brianfrankcooper/YCSB/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brianfrankcooper/YCSB/downloads","issues_url":"https://api.github.com/repos/brianfrankcooper/YCSB/issues{/number}","pulls_url":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls{/number}","milestones_url":"https://api.github.com/repos/brianfrankcooper/YCSB/milestones{/number}","notifications_url":"https://api.github.com/repos/brianfrankcooper/YCSB/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brianfrankcooper/YCSB/labels{/name}","releases_url":"https://api.github.com/repos/brianfrankcooper/YCSB/releases{/id}","created_at":"2010-04-19T20:52:11Z","updated_at":"2015-10-02T20:12:22Z","pushed_at":"2015-10-02T03:56:27Z","git_url":"git://github.com/brianfrankcooper/YCSB.git","ssh_url":"git@github.com:brianfrankcooper/YCSB.git","clone_url":"https://github.com/brianfrankcooper/YCSB.git","svn_url":"https://github.com/brianfrankcooper/YCSB","homepage":"http://research.yahoo.com/Web_Information_Management/YCSB","size":176970,"stargazers_count":947,"watchers_count":947,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":653,"mirror_url":null,"open_issues_count":114,"forks":653,"open_issues":114,"watchers":947,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/423"},"html":{"href":"https://github.com/brianfrankcooper/YCSB/pull/423"},"issue":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/issues/423"},"comments":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/issues/423/comments"},"review_comments":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/423/comments"},"review_comment":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/pulls/423/commits"},"statuses":{"href":"https://api.github.com/repos/brianfrankcooper/YCSB/statuses/c12c6f5e20c7c7ec49e16019a2436c8e7948744e"}}}}