{"action":"created","issue":{"url":"https://api.github.com/repos/gibiansky/IHaskell/issues/385","repository_url":"https://api.github.com/repos/gibiansky/IHaskell","labels_url":"https://api.github.com/repos/gibiansky/IHaskell/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/gibiansky/IHaskell/issues/385/comments","events_url":"https://api.github.com/repos/gibiansky/IHaskell/issues/385/events","html_url":"https://github.com/gibiansky/IHaskell/issues/385","id":59267463,"number":385,"title":"Add support for Criterion/benchmarking","user":{"login":"houshuang","id":61575,"avatar_url":"https://avatars.githubusercontent.com/u/61575?v=3","gravatar_id":"","url":"https://api.github.com/users/houshuang","html_url":"https://github.com/houshuang","followers_url":"https://api.github.com/users/houshuang/followers","following_url":"https://api.github.com/users/houshuang/following{/other_user}","gists_url":"https://api.github.com/users/houshuang/gists{/gist_id}","starred_url":"https://api.github.com/users/houshuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houshuang/subscriptions","organizations_url":"https://api.github.com/users/houshuang/orgs","repos_url":"https://api.github.com/users/houshuang/repos","events_url":"https://api.github.com/users/houshuang/events{/privacy}","received_events_url":"https://api.github.com/users/houshuang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gibiansky/IHaskell/labels/wishlist","name":"wishlist","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-27T17:30:28Z","updated_at":"2016-06-13T11:56:23Z","closed_at":"2015-09-06T02:54:52Z","body":"I love how you can do \r\n\r\n```python\r\n%timeit test()\r\n100000 loops, best of 3: 3.91 us per loop\r\n```\r\n\r\nin IHaskell. I wonder if we could bake in support for Criterion to enable something similar. I know things are a bit different with Haskell, and it might not work for all functions etc. But even being able to quickly compare say a function using String and Text, without setting up the source file in a special way, etc, and getting nice graphs inline in IH, would be amazing.\r\n\r\n(Would love to have some kind of memory profiling too). "},"comment":{"url":"https://api.github.com/repos/gibiansky/IHaskell/issues/comments/225560558","html_url":"https://github.com/gibiansky/IHaskell/issues/385#issuecomment-225560558","issue_url":"https://api.github.com/repos/gibiansky/IHaskell/issues/385","id":225560558,"user":{"login":"zyv","id":607401,"avatar_url":"https://avatars.githubusercontent.com/u/607401?v=3","gravatar_id":"","url":"https://api.github.com/users/zyv","html_url":"https://github.com/zyv","followers_url":"https://api.github.com/users/zyv/followers","following_url":"https://api.github.com/users/zyv/following{/other_user}","gists_url":"https://api.github.com/users/zyv/gists{/gist_id}","starred_url":"https://api.github.com/users/zyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyv/subscriptions","organizations_url":"https://api.github.com/users/zyv/orgs","repos_url":"https://api.github.com/users/zyv/repos","events_url":"https://api.github.com/users/zyv/events{/privacy}","received_events_url":"https://api.github.com/users/zyv/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T11:56:23Z","updated_at":"2016-06-13T11:56:23Z","body":"I'm sorry for hijacking this thread, but could someone please help me with a working example of using Criterion from within IHaskell? My understanding was that this should be possible now, right? I did run\r\n\r\n    stack install criterion\r\n\r\nfrom inside the container, and it worked. I was able to run\r\n\r\n    stack exec -- ghci\r\n\r\nand type there `defaultMain [ bench \"exp\" $ whnf exp (2 :: Double) ]`, which directly run the appropriate benchmark. Unfortunately, when I paste the following in the notebook cell:\r\n\r\n    import Criterion.Main\r\n    defaultMain [ bench \"exp\" $ whnf exp (2 :: Double) ]\r\n\r\nall I get is \"ExitFailure 1\". Any hints?"}}
{"actor":{"display_login":"zyv"}}