{"action":"created","issue":{"url":"https://api.github.com/repos/phpbench/phpbench/issues/183","labels_url":"https://api.github.com/repos/phpbench/phpbench/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/phpbench/phpbench/issues/183/comments","events_url":"https://api.github.com/repos/phpbench/phpbench/issues/183/events","html_url":"https://github.com/phpbench/phpbench/issues/183","id":114465689,"number":183,"title":"General discussion for usability","user":{"login":"redaxmedia","id":1835397,"avatar_url":"https://avatars.githubusercontent.com/u/1835397?v=3","gravatar_id":"","url":"https://api.github.com/users/redaxmedia","html_url":"https://github.com/redaxmedia","followers_url":"https://api.github.com/users/redaxmedia/followers","following_url":"https://api.github.com/users/redaxmedia/following{/other_user}","gists_url":"https://api.github.com/users/redaxmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/redaxmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redaxmedia/subscriptions","organizations_url":"https://api.github.com/users/redaxmedia/orgs","repos_url":"https://api.github.com/users/redaxmedia/repos","events_url":"https://api.github.com/users/redaxmedia/events{/privacy}","received_events_url":"https://api.github.com/users/redaxmedia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-01T11:42:44Z","updated_at":"2015-11-01T20:26:53Z","closed_at":null,"body":"I'd like to suggest a couple of usability issues that came up using PHPBench for the first time:\r\n\r\n1. There should be a setUp() and tearDown() etc. by default - I don't like to add\r\n<code>@BeforeMethods({\"setUp\"})</code> to every docblock\r\n\r\n2. The syntax of the data-provider was confusing to me - you should stick to PHPUnit and provide <code>$param1, $param2 and $param3</code> instead of the single <code>$params</code> array\r\n\r\n3. Is there a way to use PHPBench with a continuous integration service like Travis CI? If not, I suggest you add something like a threshold that returns an error code if the benchmarks failed\r\n\r\n4. Tabular is great but you should truncate values that are longer than 20 characters:\r\nhttp://i.snag.gy/UNsRd.jpg\r\n\r\n5. Please use semantic versioning... 0.6.0 instead of 0.6\r\n\r\nKeep in mind, this is just a discussion - please create new issues for each one of the issues\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/phpbench/phpbench/issues/comments/152860903","html_url":"https://github.com/phpbench/phpbench/issues/183#issuecomment-152860903","issue_url":"https://api.github.com/repos/phpbench/phpbench/issues/183","id":152860903,"user":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T20:26:53Z","updated_at":"2015-11-01T20:26:53Z","body":"> There should be a setUp() and tearDown() etc. by default - I don't like to add\r\n@BeforeMethods({\"setUp\"}) to every docblock\r\n\r\nYou can add this annotation to the class docblock, if you want all of your classes to have a `setUp` and `tearDown` you can define a single base class which your benchmarks extend, and annotate that.\r\n\r\n````php\r\n/**\r\n * My base benchmark\r\n * @BeforeMethods({\"setUp\"})\r\n */\r\n````\r\n\r\nBasically I wanted to avoid magic (checking if a method exists and then executing it if it does).\r\n\r\n> The syntax of the data-provider was confusing to me - you should stick to PHPUnit and provide $param1, $param2 and $param3 instead of the single $params array\r\n\r\nWill have to think about that. PHPBench is different from PHPUnit in that it provides always an associative array for data - and allows you to specify multiple parameter providers and provide data sets using all possible combinations. For this associative arrays are better I think. But lets discuss.\r\n\r\n> Is there a way to use PHPBench with a continuous integration service like Travis CI? If not, I suggest you add something like a threshold that returns an error code if the benchmarks failed\r\n\r\nThe problem with Travis CI is that it is not designed to run at a consistent speed. You may get different times for each build using the same code. It would be nice to create a system using VMs which gurantee resources and so provide a stable platform, but I havn't looked into this much yet.\r\n\r\n> Tabular is great but you should truncate values that are longer than 20 characters\r\n\r\nThe problem is that we don't know which part of that string is relevant. Could you create an issue for this?\r\n\r\n> Semantic versioning.\r\n\r\nI am currently just increasing by 0.1 each time until the 1.0 release, where I semver will be started properly - basically BC can be broken at any point before 1.0, so not sure that managing patch versions is relevant (?)"}}