{"action":"closed","number":271,"pull_request":{"url":"https://api.github.com/repos/barrucadu/dejafu/pulls/271","id":195375100,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1Mzc1MTAw","html_url":"https://github.com/barrucadu/dejafu/pull/271","diff_url":"https://github.com/barrucadu/dejafu/pull/271.diff","patch_url":"https://github.com/barrucadu/dejafu/pull/271.patch","issue_url":"https://api.github.com/repos/barrucadu/dejafu/issues/271","number":271,"state":"closed","locked":false,"title":"Add a \"safe IO\" flag","user":{"login":"barrucadu","id":75235,"node_id":"MDQ6VXNlcjc1MjM1","avatar_url":"https://avatars0.githubusercontent.com/u/75235?v=4","gravatar_id":"","url":"https://api.github.com/users/barrucadu","html_url":"https://github.com/barrucadu","followers_url":"https://api.github.com/users/barrucadu/followers","following_url":"https://api.github.com/users/barrucadu/following{/other_user}","gists_url":"https://api.github.com/users/barrucadu/gists{/gist_id}","starred_url":"https://api.github.com/users/barrucadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrucadu/subscriptions","organizations_url":"https://api.github.com/users/barrucadu/orgs","repos_url":"https://api.github.com/users/barrucadu/repos","events_url":"https://api.github.com/users/barrucadu/events{/privacy}","received_events_url":"https://api.github.com/users/barrucadu/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nAdds a flag to indicate all IO is thread-safe.  This doesn't help with programs that have a mix of thread-safe and thread-unsafe IO, but I hope that there is a reasonably large class of programs where the only IO is for things like thread-local PRNGs and the like.\r\n\r\n**Related issues:** closes #224\r\n\r\n## Checklist\r\n\r\n- [x] Add new tests to dejafu-tests\r\n- [x] Performance comparison on systematic testing for par monad example\r\n\r\n## Benchmark results\r\n\r\n### Without systematic par test\r\n\r\n**Before:**\r\n\r\n```\r\n$ stack exec -- dejafu-tests +RTS -s\r\n\r\n 142,901,146,320 bytes allocated in the heap\r\n  31,388,207,960 bytes copied during GC\r\n      14,024,608 bytes maximum residency (6323 sample(s))\r\n         146,744 bytes maximum slop\r\n              38 MB total memory in use (0 MB lost due to fragmentation)\r\n\r\n                                     Tot time (elapsed)  Avg pause  Max pause\r\n  Gen  0     131731 colls,     0 par   70.915s  70.897s     0.0005s    0.0354s\r\n  Gen  1      6323 colls,     0 par    4.964s   4.963s     0.0008s    0.0022s\r\n\r\n  TASKS: 227991 (227986 bound, 5 peak workers (5 total), using -N1)\r\n\r\n  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)\r\n\r\n  INIT    time    0.000s  (  0.000s elapsed)\r\n  MUT     time  171.291s  (163.647s elapsed)\r\n  GC      time   75.879s  ( 75.860s elapsed)\r\n  EXIT    time    0.001s  (  0.003s elapsed)\r\n  Total   time  247.171s  (239.510s elapsed)\r\n\r\n  Alloc rate    834,260,065 bytes per MUT second\r\n\r\n  Productivity  69.3% of total user, 68.3% of total elapsed\r\n```\r\n\r\n**After:**\r\n\r\n```\r\n$ stack exec -- dejafu-tests +RTS -s\r\n\r\n 143,989,514,888 bytes allocated in the heap\r\n  31,970,755,160 bytes copied during GC\r\n      14,022,152 bytes maximum residency (6201 sample(s))\r\n         145,816 bytes maximum slop\r\n              38 MB total memory in use (0 MB lost due to fragmentation)\r\n\r\n                                     Tot time (elapsed)  Avg pause  Max pause\r\n  Gen  0     132926 colls,     0 par   72.848s  72.780s     0.0005s    0.0330s\r\n  Gen  1      6201 colls,     0 par    4.891s   4.888s     0.0008s    0.0024s\r\n\r\n  TASKS: 227859 (227854 bound, 5 peak workers (5 total), using -N1)\r\n\r\n  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)\r\n\r\n  INIT    time    0.000s  (  0.000s elapsed)\r\n  MUT     time  169.741s  (162.130s elapsed)\r\n  GC      time   77.738s  ( 77.668s elapsed)\r\n  EXIT    time    0.001s  (  0.003s elapsed)\r\n  Total   time  247.481s  (239.800s elapsed)\r\n\r\n  Alloc rate    848,289,519 bytes per MUT second\r\n\r\n  Productivity  68.6% of total user, 67.6% of total elapsed\r\n```\r\n### With systematic par test\r\n\r\n**Before:**\r\n\r\n```\r\n$ stack exec -- dejafu-tests +RTS -s\r\n\r\n 621,082,673,912 bytes allocated in the heap                                                                                          \r\n 319,844,942,272 bytes copied during GC\r\n     174,860,488 bytes maximum residency (8406 sample(s))\r\n       1,697,592 bytes maximum slop\r\n             489 MB total memory in use (0 MB lost due to fragmentation)\r\n\r\n                                     Tot time (elapsed)  Avg pause  Max pause\r\n  Gen  0     586924 colls,     0 par   544.721s  544.390s     0.0009s    0.2977s\r\n  Gen  1      8406 colls,     0 par    6.108s   6.104s     0.0007s    0.0019s\r\n\r\n  TASKS: 241379 (241374 bound, 5 peak workers (5 total), using -N1)\r\n\r\n  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)\r\n\r\n  INIT    time    0.000s  (  0.000s elapsed)\r\n  MUT     time  416.744s  (408.224s elapsed)\r\n  GC      time  550.829s  (550.494s elapsed)\r\n  EXIT    time    0.034s  (  0.042s elapsed)\r\n  Total   time  967.607s  (958.760s elapsed)\r\n\r\n  Alloc rate    1,490,321,894 bytes per MUT second\r\n\r\n  Productivity  43.1% of total user, 42.6% of total elapsed\r\n```\r\n\r\n`ParMonad/testing exposes a deadlock/systematically` took 717.68s.\r\n\r\n**After:**\r\n\r\n```\r\n$ stack exec -- dejafu-tests +RTS -s\r\n\r\n 149,739,906,080 bytes allocated in the heap                                                                                          \r\n  36,054,433,992 bytes copied during GC\r\n      14,078,072 bytes maximum residency (6604 sample(s))\r\n         197,448 bytes maximum slop\r\n              38 MB total memory in use (0 MB lost due to fragmentation)\r\n\r\n                                     Tot time (elapsed)  Avg pause  Max pause\r\n  Gen  0     138048 colls,     0 par   78.591s  78.554s     0.0006s    0.0376s\r\n  Gen  1      6604 colls,     0 par    5.159s   5.161s     0.0008s    0.0029s\r\n\r\n  TASKS: 228163 (228158 bound, 5 peak workers (5 total), using -N1)\r\n\r\n  SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)\r\n\r\n  INIT    time    0.000s  (  0.000s elapsed)\r\n  MUT     time  172.307s  (164.302s elapsed)\r\n  GC      time   83.751s  ( 83.715s elapsed)\r\n  EXIT    time    0.001s  (  0.003s elapsed)\r\n  Total   time  256.059s  (248.020s elapsed)\r\n\r\n  Alloc rate    869,028,162 bytes per MUT second\r\n\r\n  Productivity  67.3% of total user, 66.2% of total elapsed\r\n```\r\n\r\n`ParMonad/testing exposes a deadlock/systematically` took 11.32s.","created_at":"2018-06-17T12:20:05Z","updated_at":"2018-06-17T13:20:36Z","closed_at":"2018-06-17T13:20:36Z","merged_at":"2018-06-17T13:20:36Z","merge_commit_sha":"cbbebdaf5e86f6561e501c4ca5a9ce075480aedf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/barrucadu/dejafu/pulls/271/commits","review_comments_url":"https://api.github.com/repos/barrucadu/dejafu/pulls/271/comments","review_comment_url":"https://api.github.com/repos/barrucadu/dejafu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/barrucadu/dejafu/issues/271/comments","statuses_url":"https://api.github.com/repos/barrucadu/dejafu/statuses/c1fd195c028f045f88d9c9e9faeaa7b296ee2015","head":{"label":"barrucadu:224-safe-io","ref":"224-safe-io","sha":"c1fd195c028f045f88d9c9e9faeaa7b296ee2015","user":{"login":"barrucadu","id":75235,"node_id":"MDQ6VXNlcjc1MjM1","avatar_url":"https://avatars0.githubusercontent.com/u/75235?v=4","gravatar_id":"","url":"https://api.github.com/users/barrucadu","html_url":"https://github.com/barrucadu","followers_url":"https://api.github.com/users/barrucadu/followers","following_url":"https://api.github.com/users/barrucadu/following{/other_user}","gists_url":"https://api.github.com/users/barrucadu/gists{/gist_id}","starred_url":"https://api.github.com/users/barrucadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrucadu/subscriptions","organizations_url":"https://api.github.com/users/barrucadu/orgs","repos_url":"https://api.github.com/users/barrucadu/repos","events_url":"https://api.github.com/users/barrucadu/events{/privacy}","received_events_url":"https://api.github.com/users/barrucadu/received_events","type":"User","site_admin":false},"repo":{"id":28218918,"node_id":"MDEwOlJlcG9zaXRvcnkyODIxODkxOA==","name":"dejafu","full_name":"barrucadu/dejafu","owner":{"login":"barrucadu","id":75235,"node_id":"MDQ6VXNlcjc1MjM1","avatar_url":"https://avatars0.githubusercontent.com/u/75235?v=4","gravatar_id":"","url":"https://api.github.com/users/barrucadu","html_url":"https://github.com/barrucadu","followers_url":"https://api.github.com/users/barrucadu/followers","following_url":"https://api.github.com/users/barrucadu/following{/other_user}","gists_url":"https://api.github.com/users/barrucadu/gists{/gist_id}","starred_url":"https://api.github.com/users/barrucadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrucadu/subscriptions","organizations_url":"https://api.github.com/users/barrucadu/orgs","repos_url":"https://api.github.com/users/barrucadu/repos","events_url":"https://api.github.com/users/barrucadu/events{/privacy}","received_events_url":"https://api.github.com/users/barrucadu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/barrucadu/dejafu","description":"Systematic concurrency testing meets Haskell.","fork":false,"url":"https://api.github.com/repos/barrucadu/dejafu","forks_url":"https://api.github.com/repos/barrucadu/dejafu/forks","keys_url":"https://api.github.com/repos/barrucadu/dejafu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/barrucadu/dejafu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/barrucadu/dejafu/teams","hooks_url":"https://api.github.com/repos/barrucadu/dejafu/hooks","issue_events_url":"https://api.github.com/repos/barrucadu/dejafu/issues/events{/number}","events_url":"https://api.github.com/repos/barrucadu/dejafu/events","assignees_url":"https://api.github.com/repos/barrucadu/dejafu/assignees{/user}","branches_url":"https://api.github.com/repos/barrucadu/dejafu/branches{/branch}","tags_url":"https://api.github.com/repos/barrucadu/dejafu/tags","blobs_url":"https://api.github.com/repos/barrucadu/dejafu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/barrucadu/dejafu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/barrucadu/dejafu/git/refs{/sha}","trees_url":"https://api.github.com/repos/barrucadu/dejafu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/barrucadu/dejafu/statuses/{sha}","languages_url":"https://api.github.com/repos/barrucadu/dejafu/languages","stargazers_url":"https://api.github.com/repos/barrucadu/dejafu/stargazers","contributors_url":"https://api.github.com/repos/barrucadu/dejafu/contributors","subscribers_url":"https://api.github.com/repos/barrucadu/dejafu/subscribers","subscription_url":"https://api.github.com/repos/barrucadu/dejafu/subscription","commits_url":"https://api.github.com/repos/barrucadu/dejafu/commits{/sha}","git_commits_url":"https://api.github.com/repos/barrucadu/dejafu/git/commits{/sha}","comments_url":"https://api.github.com/repos/barrucadu/dejafu/comments{/number}","issue_comment_url":"https://api.github.com/repos/barrucadu/dejafu/issues/comments{/number}","contents_url":"https://api.github.com/repos/barrucadu/dejafu/contents/{+path}","compare_url":"https://api.github.com/repos/barrucadu/dejafu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/barrucadu/dejafu/merges","archive_url":"https://api.github.com/repos/barrucadu/dejafu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/barrucadu/dejafu/downloads","issues_url":"https://api.github.com/repos/barrucadu/dejafu/issues{/number}","pulls_url":"https://api.github.com/repos/barrucadu/dejafu/pulls{/number}","milestones_url":"https://api.github.com/repos/barrucadu/dejafu/milestones{/number}","notifications_url":"https://api.github.com/repos/barrucadu/dejafu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/barrucadu/dejafu/labels{/name}","releases_url":"https://api.github.com/repos/barrucadu/dejafu/releases{/id}","deployments_url":"https://api.github.com/repos/barrucadu/dejafu/deployments","created_at":"2014-12-19T07:21:45Z","updated_at":"2018-06-17T10:51:12Z","pushed_at":"2018-06-17T13:20:36Z","git_url":"git://github.com/barrucadu/dejafu.git","ssh_url":"git@github.com:barrucadu/dejafu.git","clone_url":"https://github.com/barrucadu/dejafu.git","svn_url":"https://github.com/barrucadu/dejafu","homepage":"http://dejafu.readthedocs.io","size":2164,"stargazers_count":96,"watchers_count":96,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":33,"license":null,"forks":12,"open_issues":33,"watchers":96,"default_branch":"master"}},"base":{"label":"barrucadu:master","ref":"master","sha":"6966c377b6f842caac32d7dfc49d30b86d5cd51a","user":{"login":"barrucadu","id":75235,"node_id":"MDQ6VXNlcjc1MjM1","avatar_url":"https://avatars0.githubusercontent.com/u/75235?v=4","gravatar_id":"","url":"https://api.github.com/users/barrucadu","html_url":"https://github.com/barrucadu","followers_url":"https://api.github.com/users/barrucadu/followers","following_url":"https://api.github.com/users/barrucadu/following{/other_user}","gists_url":"https://api.github.com/users/barrucadu/gists{/gist_id}","starred_url":"https://api.github.com/users/barrucadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrucadu/subscriptions","organizations_url":"https://api.github.com/users/barrucadu/orgs","repos_url":"https://api.github.com/users/barrucadu/repos","events_url":"https://api.github.com/users/barrucadu/events{/privacy}","received_events_url":"https://api.github.com/users/barrucadu/received_events","type":"User","site_admin":false},"repo":{"id":28218918,"node_id":"MDEwOlJlcG9zaXRvcnkyODIxODkxOA==","name":"dejafu","full_name":"barrucadu/dejafu","owner":{"login":"barrucadu","id":75235,"node_id":"MDQ6VXNlcjc1MjM1","avatar_url":"https://avatars0.githubusercontent.com/u/75235?v=4","gravatar_id":"","url":"https://api.github.com/users/barrucadu","html_url":"https://github.com/barrucadu","followers_url":"https://api.github.com/users/barrucadu/followers","following_url":"https://api.github.com/users/barrucadu/following{/other_user}","gists_url":"https://api.github.com/users/barrucadu/gists{/gist_id}","starred_url":"https://api.github.com/users/barrucadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrucadu/subscriptions","organizations_url":"https://api.github.com/users/barrucadu/orgs","repos_url":"https://api.github.com/users/barrucadu/repos","events_url":"https://api.github.com/users/barrucadu/events{/privacy}","received_events_url":"https://api.github.com/users/barrucadu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/barrucadu/dejafu","description":"Systematic concurrency testing meets Haskell.","fork":false,"url":"https://api.github.com/repos/barrucadu/dejafu","forks_url":"https://api.github.com/repos/barrucadu/dejafu/forks","keys_url":"https://api.github.com/repos/barrucadu/dejafu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/barrucadu/dejafu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/barrucadu/dejafu/teams","hooks_url":"https://api.github.com/repos/barrucadu/dejafu/hooks","issue_events_url":"https://api.github.com/repos/barrucadu/dejafu/issues/events{/number}","events_url":"https://api.github.com/repos/barrucadu/dejafu/events","assignees_url":"https://api.github.com/repos/barrucadu/dejafu/assignees{/user}","branches_url":"https://api.github.com/repos/barrucadu/dejafu/branches{/branch}","tags_url":"https://api.github.com/repos/barrucadu/dejafu/tags","blobs_url":"https://api.github.com/repos/barrucadu/dejafu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/barrucadu/dejafu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/barrucadu/dejafu/git/refs{/sha}","trees_url":"https://api.github.com/repos/barrucadu/dejafu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/barrucadu/dejafu/statuses/{sha}","languages_url":"https://api.github.com/repos/barrucadu/dejafu/languages","stargazers_url":"https://api.github.com/repos/barrucadu/dejafu/stargazers","contributors_url":"https://api.github.com/repos/barrucadu/dejafu/contributors","subscribers_url":"https://api.github.com/repos/barrucadu/dejafu/subscribers","subscription_url":"https://api.github.com/repos/barrucadu/dejafu/subscription","commits_url":"https://api.github.com/repos/barrucadu/dejafu/commits{/sha}","git_commits_url":"https://api.github.com/repos/barrucadu/dejafu/git/commits{/sha}","comments_url":"https://api.github.com/repos/barrucadu/dejafu/comments{/number}","issue_comment_url":"https://api.github.com/repos/barrucadu/dejafu/issues/comments{/number}","contents_url":"https://api.github.com/repos/barrucadu/dejafu/contents/{+path}","compare_url":"https://api.github.com/repos/barrucadu/dejafu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/barrucadu/dejafu/merges","archive_url":"https://api.github.com/repos/barrucadu/dejafu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/barrucadu/dejafu/downloads","issues_url":"https://api.github.com/repos/barrucadu/dejafu/issues{/number}","pulls_url":"https://api.github.com/repos/barrucadu/dejafu/pulls{/number}","milestones_url":"https://api.github.com/repos/barrucadu/dejafu/milestones{/number}","notifications_url":"https://api.github.com/repos/barrucadu/dejafu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/barrucadu/dejafu/labels{/name}","releases_url":"https://api.github.com/repos/barrucadu/dejafu/releases{/id}","deployments_url":"https://api.github.com/repos/barrucadu/dejafu/deployments","created_at":"2014-12-19T07:21:45Z","updated_at":"2018-06-17T10:51:12Z","pushed_at":"2018-06-17T13:20:36Z","git_url":"git://github.com/barrucadu/dejafu.git","ssh_url":"git@github.com:barrucadu/dejafu.git","clone_url":"https://github.com/barrucadu/dejafu.git","svn_url":"https://github.com/barrucadu/dejafu","homepage":"http://dejafu.readthedocs.io","size":2164,"stargazers_count":96,"watchers_count":96,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":33,"license":null,"forks":12,"open_issues":33,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/barrucadu/dejafu/pulls/271"},"html":{"href":"https://github.com/barrucadu/dejafu/pull/271"},"issue":{"href":"https://api.github.com/repos/barrucadu/dejafu/issues/271"},"comments":{"href":"https://api.github.com/repos/barrucadu/dejafu/issues/271/comments"},"review_comments":{"href":"https://api.github.com/repos/barrucadu/dejafu/pulls/271/comments"},"review_comment":{"href":"https://api.github.com/repos/barrucadu/dejafu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/barrucadu/dejafu/pulls/271/commits"},"statuses":{"href":"https://api.github.com/repos/barrucadu/dejafu/statuses/c1fd195c028f045f88d9c9e9faeaa7b296ee2015"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"barrucadu","id":75235,"node_id":"MDQ6VXNlcjc1MjM1","avatar_url":"https://avatars0.githubusercontent.com/u/75235?v=4","gravatar_id":"","url":"https://api.github.com/users/barrucadu","html_url":"https://github.com/barrucadu","followers_url":"https://api.github.com/users/barrucadu/followers","following_url":"https://api.github.com/users/barrucadu/following{/other_user}","gists_url":"https://api.github.com/users/barrucadu/gists{/gist_id}","starred_url":"https://api.github.com/users/barrucadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrucadu/subscriptions","organizations_url":"https://api.github.com/users/barrucadu/orgs","repos_url":"https://api.github.com/users/barrucadu/repos","events_url":"https://api.github.com/users/barrucadu/events{/privacy}","received_events_url":"https://api.github.com/users/barrucadu/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":4,"additions":111,"deletions":58,"changed_files":14}}
{"actor":{"display_login":"barrucadu"}}