{"action":"created","comment":{"url":"https://api.github.com/repos/pingcap/fail-rs/pulls/comments/139876023","pull_request_review_id":63867687,"id":139876023,"diff_hunk":"@@ -304,11 +361,36 @@ pub fn eval<R, F: FnOnce(ReturnValue) -> R>(name: &str, f: F) -> Option<R> {\n     p.eval(name).map(f)\n }\n \n+/// Set new actions to a fail point at runtime.\n+///\n+/// Actions should be in the format of `action[->action...]`. When multiple action\n+/// is specified, action will be examined only when its former action is not triggered.\n+///\n+/// Action should be in the format `[p%][cnt*]task[(arg)]`. `p%` is the expected probability\n+/// action is triggered, `cnt*` is the max times the action can be triggered. Supported `task`\n+/// includes:\n+///\n+/// - `off`, the fail point will do nothing.\n+/// - `return(arg)`, return early when the fail point is triggered. `arg` is passed to `$e` (define\n+/// via `fail_point!` macro) as string.\n+/// - `sleep(milliseconds)`, sleep for the specified time.\n+/// - `panic(msg)`, panic with the message.\n+/// - `print(msg)`, print the message.\n+/// - `pause`, sleep until other action is set to the fail point.\n+/// - `yield`, yield the CPU.\n+/// - `delay(milliseconds)`, busy waiting for the specified time.","path":"src/lib.rs","position":142,"original_position":142,"commit_id":"f3fd5d3d978f86021ffacbcfa85df0c8f080c6c0","original_commit_id":"f3fd5d3d978f86021ffacbcfa85df0c8f080c6c0","user":{"login":"queenypingcap","id":19528243,"avatar_url":"https://avatars2.githubusercontent.com/u/19528243?v=4","gravatar_id":"","url":"https://api.github.com/users/queenypingcap","html_url":"https://github.com/queenypingcap","followers_url":"https://api.github.com/users/queenypingcap/followers","following_url":"https://api.github.com/users/queenypingcap/following{/other_user}","gists_url":"https://api.github.com/users/queenypingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/queenypingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/queenypingcap/subscriptions","organizations_url":"https://api.github.com/users/queenypingcap/orgs","repos_url":"https://api.github.com/users/queenypingcap/repos","events_url":"https://api.github.com/users/queenypingcap/events{/privacy}","received_events_url":"https://api.github.com/users/queenypingcap/received_events","type":"User","site_admin":false},"body":"Sorry, I don't understand the meaning...","created_at":"2017-09-20T05:04:55Z","updated_at":"2017-09-20T05:04:55Z","html_url":"https://github.com/pingcap/fail-rs/pull/4#discussion_r139876023","pull_request_url":"https://api.github.com/repos/pingcap/fail-rs/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/pingcap/fail-rs/pulls/comments/139876023"},"html":{"href":"https://github.com/pingcap/fail-rs/pull/4#discussion_r139876023"},"pull_request":{"href":"https://api.github.com/repos/pingcap/fail-rs/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/pingcap/fail-rs/pulls/4","id":141786580,"html_url":"https://github.com/pingcap/fail-rs/pull/4","diff_url":"https://github.com/pingcap/fail-rs/pull/4.diff","patch_url":"https://github.com/pingcap/fail-rs/pull/4.patch","issue_url":"https://api.github.com/repos/pingcap/fail-rs/issues/4","number":4,"state":"open","locked":false,"title":"add docs and readme","user":{"login":"BusyJay","id":1701473,"avatar_url":"https://avatars3.githubusercontent.com/u/1701473?v=4","gravatar_id":"","url":"https://api.github.com/users/BusyJay","html_url":"https://github.com/BusyJay","followers_url":"https://api.github.com/users/BusyJay/followers","following_url":"https://api.github.com/users/BusyJay/following{/other_user}","gists_url":"https://api.github.com/users/BusyJay/gists{/gist_id}","starred_url":"https://api.github.com/users/BusyJay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BusyJay/subscriptions","organizations_url":"https://api.github.com/users/BusyJay/orgs","repos_url":"https://api.github.com/users/BusyJay/repos","events_url":"https://api.github.com/users/BusyJay/events{/privacy}","received_events_url":"https://api.github.com/users/BusyJay/received_events","type":"User","site_admin":false},"body":"Add a simple README and fill all missing docs.","created_at":"2017-09-19T08:28:58Z","updated_at":"2017-09-20T05:04:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae0e660e729faca8b50c5dd4b0440a41cf155b5b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"siddontang","id":1080370,"avatar_url":"https://avatars2.githubusercontent.com/u/1080370?v=4","gravatar_id":"","url":"https://api.github.com/users/siddontang","html_url":"https://github.com/siddontang","followers_url":"https://api.github.com/users/siddontang/followers","following_url":"https://api.github.com/users/siddontang/following{/other_user}","gists_url":"https://api.github.com/users/siddontang/gists{/gist_id}","starred_url":"https://api.github.com/users/siddontang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siddontang/subscriptions","organizations_url":"https://api.github.com/users/siddontang/orgs","repos_url":"https://api.github.com/users/siddontang/repos","events_url":"https://api.github.com/users/siddontang/events{/privacy}","received_events_url":"https://api.github.com/users/siddontang/received_events","type":"User","site_admin":false},{"login":"overvenus","id":2150711,"avatar_url":"https://avatars0.githubusercontent.com/u/2150711?v=4","gravatar_id":"","url":"https://api.github.com/users/overvenus","html_url":"https://github.com/overvenus","followers_url":"https://api.github.com/users/overvenus/followers","following_url":"https://api.github.com/users/overvenus/following{/other_user}","gists_url":"https://api.github.com/users/overvenus/gists{/gist_id}","starred_url":"https://api.github.com/users/overvenus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overvenus/subscriptions","organizations_url":"https://api.github.com/users/overvenus/orgs","repos_url":"https://api.github.com/users/overvenus/repos","events_url":"https://api.github.com/users/overvenus/events{/privacy}","received_events_url":"https://api.github.com/users/overvenus/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/fail-rs/pulls/4/commits","review_comments_url":"https://api.github.com/repos/pingcap/fail-rs/pulls/4/comments","review_comment_url":"https://api.github.com/repos/pingcap/fail-rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/fail-rs/issues/4/comments","statuses_url":"https://api.github.com/repos/pingcap/fail-rs/statuses/f3fd5d3d978f86021ffacbcfa85df0c8f080c6c0","head":{"label":"pingcap:busyjay/fix-docs","ref":"busyjay/fix-docs","sha":"f3fd5d3d978f86021ffacbcfa85df0c8f080c6c0","user":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":103275720,"name":"fail-rs","full_name":"pingcap/fail-rs","owner":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pingcap/fail-rs","description":"Fail points for rust","fork":false,"url":"https://api.github.com/repos/pingcap/fail-rs","forks_url":"https://api.github.com/repos/pingcap/fail-rs/forks","keys_url":"https://api.github.com/repos/pingcap/fail-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/fail-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/fail-rs/teams","hooks_url":"https://api.github.com/repos/pingcap/fail-rs/hooks","issue_events_url":"https://api.github.com/repos/pingcap/fail-rs/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/fail-rs/events","assignees_url":"https://api.github.com/repos/pingcap/fail-rs/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/fail-rs/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/fail-rs/tags","blobs_url":"https://api.github.com/repos/pingcap/fail-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/fail-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/fail-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/fail-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/fail-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/fail-rs/languages","stargazers_url":"https://api.github.com/repos/pingcap/fail-rs/stargazers","contributors_url":"https://api.github.com/repos/pingcap/fail-rs/contributors","subscribers_url":"https://api.github.com/repos/pingcap/fail-rs/subscribers","subscription_url":"https://api.github.com/repos/pingcap/fail-rs/subscription","commits_url":"https://api.github.com/repos/pingcap/fail-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/fail-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/fail-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/fail-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/fail-rs/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/fail-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/fail-rs/merges","archive_url":"https://api.github.com/repos/pingcap/fail-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/fail-rs/downloads","issues_url":"https://api.github.com/repos/pingcap/fail-rs/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/fail-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/fail-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/fail-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/fail-rs/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/fail-rs/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/fail-rs/deployments","created_at":"2017-09-12T13:41:13Z","updated_at":"2017-09-19T15:55:24Z","pushed_at":"2017-09-19T12:52:09Z","git_url":"git://github.com/pingcap/fail-rs.git","ssh_url":"git@github.com:pingcap/fail-rs.git","clone_url":"https://github.com/pingcap/fail-rs.git","svn_url":"https://github.com/pingcap/fail-rs","homepage":"","size":16,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"1ccc93c431902e72760ab60cc23427b1c89dcf23","user":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":103275720,"name":"fail-rs","full_name":"pingcap/fail-rs","owner":{"login":"pingcap","id":11855343,"avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pingcap/fail-rs","description":"Fail points for rust","fork":false,"url":"https://api.github.com/repos/pingcap/fail-rs","forks_url":"https://api.github.com/repos/pingcap/fail-rs/forks","keys_url":"https://api.github.com/repos/pingcap/fail-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/fail-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/fail-rs/teams","hooks_url":"https://api.github.com/repos/pingcap/fail-rs/hooks","issue_events_url":"https://api.github.com/repos/pingcap/fail-rs/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/fail-rs/events","assignees_url":"https://api.github.com/repos/pingcap/fail-rs/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/fail-rs/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/fail-rs/tags","blobs_url":"https://api.github.com/repos/pingcap/fail-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/fail-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/fail-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/fail-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/fail-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/fail-rs/languages","stargazers_url":"https://api.github.com/repos/pingcap/fail-rs/stargazers","contributors_url":"https://api.github.com/repos/pingcap/fail-rs/contributors","subscribers_url":"https://api.github.com/repos/pingcap/fail-rs/subscribers","subscription_url":"https://api.github.com/repos/pingcap/fail-rs/subscription","commits_url":"https://api.github.com/repos/pingcap/fail-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/fail-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/fail-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/fail-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/fail-rs/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/fail-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/fail-rs/merges","archive_url":"https://api.github.com/repos/pingcap/fail-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/fail-rs/downloads","issues_url":"https://api.github.com/repos/pingcap/fail-rs/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/fail-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/fail-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/fail-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/fail-rs/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/fail-rs/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/fail-rs/deployments","created_at":"2017-09-12T13:41:13Z","updated_at":"2017-09-19T15:55:24Z","pushed_at":"2017-09-19T12:52:09Z","git_url":"git://github.com/pingcap/fail-rs.git","ssh_url":"git@github.com:pingcap/fail-rs.git","clone_url":"https://github.com/pingcap/fail-rs.git","svn_url":"https://github.com/pingcap/fail-rs","homepage":"","size":16,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/fail-rs/pulls/4"},"html":{"href":"https://github.com/pingcap/fail-rs/pull/4"},"issue":{"href":"https://api.github.com/repos/pingcap/fail-rs/issues/4"},"comments":{"href":"https://api.github.com/repos/pingcap/fail-rs/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/fail-rs/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/fail-rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/fail-rs/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/fail-rs/statuses/f3fd5d3d978f86021ffacbcfa85df0c8f080c6c0"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"queenypingcap"}}