{"action":"opened","number":9810,"pull_request":{"url":"https://api.github.com/repos/PX4/Firmware/pulls/9810","id":198487675,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NDg3Njc1","html_url":"https://github.com/PX4/Firmware/pull/9810","diff_url":"https://github.com/PX4/Firmware/pull/9810.diff","patch_url":"https://github.com/PX4/Firmware/pull/9810.patch","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/9810","number":9810,"state":"open","locked":false,"title":"tests add simple timing microbenchmark","user":{"login":"dagar","id":84712,"node_id":"MDQ6VXNlcjg0NzEy","avatar_url":"https://avatars3.githubusercontent.com/u/84712?v=4","gravatar_id":"","url":"https://api.github.com/users/dagar","html_url":"https://github.com/dagar","followers_url":"https://api.github.com/users/dagar/followers","following_url":"https://api.github.com/users/dagar/following{/other_user}","gists_url":"https://api.github.com/users/dagar/gists{/gist_id}","starred_url":"https://api.github.com/users/dagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagar/subscriptions","organizations_url":"https://api.github.com/users/dagar/orgs","repos_url":"https://api.github.com/users/dagar/repos","events_url":"https://api.github.com/users/dagar/events{/privacy}","received_events_url":"https://api.github.com/users/dagar/received_events","type":"User","site_admin":false},"body":"This is a simple benchmark of common operations with various data types and sizes.\r\n\r\nA lot of the results are quite dependant on the specific data, but this should help give the general idea.\r\n\r\nExample px4fmu-v4\r\n\r\n\tnsh> tests microbench\r\n\tINFO  [tests] RUNNING TEST: time_single_prevision_float\r\n\tfloat add: 1000 events, 687us elapsed, 0.69us avg, min 1us max 1us 0.464us rms\r\n\tfloat sub: 1000 events, 676us elapsed, 0.68us avg, min 0us max 1us 0.468us rms\r\n\tfloat mul: 1000 events, 629us elapsed, 0.63us avg, min 1us max 1us 0.483us rms\r\n\tfloat div: 1000 events, 763us elapsed, 0.76us avg, min 1us max 1us 0.425us rms\r\n\tfloat sqrt: 1000 events, 733us elapsed, 0.73us avg, min 1us max 1us 0.443us rms\r\n\tINFO  [tests] TEST PASSED: time_single_prevision_float\r\n\r\n\tINFO  [tests] RUNNING TEST: time_single_prevision_float_trig\r\n\tsinf(): 1000 events, 2617us elapsed, 2.62us avg, min 2us max 3us 0.486us rms\r\n\tcosf(): 1000 events, 2504us elapsed, 2.50us avg, min 2us max 3us 0.500us rms\r\n\ttanf(): 1000 events, 3221us elapsed, 3.22us avg, min 3us max 4us 0.415us rms\r\n\tacosf(): 1000 events, 2808us elapsed, 2.81us avg, min 2us max 3us 0.394us rms\r\n\tasinf(): 1000 events, 2818us elapsed, 2.82us avg, min 2us max 3us 0.386us rms\r\n\tatan2f(): 1000 events, 2822us elapsed, 2.82us avg, min 2us max 3us 0.383us rms\r\n\tINFO  [tests] TEST PASSED: time_single_prevision_float_trig\r\n\r\n\tINFO  [tests] RUNNING TEST: time_double_prevision_float\r\n\tdouble add: 1000 events, 1548us elapsed, 1.55us avg, min 1us max 2us 0.498us rms\r\n\tdouble sub: 1000 events, 1459us elapsed, 1.46us avg, min 1us max 2us 0.499us rms\r\n\tdouble mul: 1000 events, 1147us elapsed, 1.15us avg, min 1us max 2us 0.354us rms\r\n\tdouble div: 1000 events, 4631us elapsed, 4.63us avg, min 4us max 5us 0.483us rms\r\n\tdouble sqrt: 1000 events, 4502us elapsed, 4.50us avg, min 4us max 5us 0.500us rms\r\n\tINFO  [tests] TEST PASSED: time_double_prevision_float\r\n\r\n\tINFO  [tests] RUNNING TEST: time_double_prevision_float_trig\r\n\tsin(): 1000 events, 18326us elapsed, 18.33us avg, min 18us max 19us 0.469us rms\r\n\tcos(): 1000 events, 16996us elapsed, 17.00us avg, min 16us max 17us 0.063us rms\r\n\ttan(): 1000 events, 32962us elapsed, 32.96us avg, min 32us max 34us 0.206us rms\r\n\tacos(): 1000 events, 4528us elapsed, 4.53us avg, min 4us max 5us 0.499us rms\r\n\tasin(): 1000 events, 4686us elapsed, 4.69us avg, min 4us max 5us 0.464us rms\r\n\tatan2(): 1000 events, 27950us elapsed, 27.95us avg, min 27us max 28us 0.218us rms\r\n\tsqrt(): 1000 events, 4518us elapsed, 4.52us avg, min 4us max 5us 0.500us rms\r\n\tINFO  [tests] TEST PASSED: time_double_prevision_float_trig\r\n\r\n\tINFO  [tests] RUNNING TEST: time_8bit_integers\r\n\tint8 add: 1000 events, 778us elapsed, 0.78us avg, min 1us max 1us 0.416us rms\r\n\tint8 sub: 1000 events, 695us elapsed, 0.69us avg, min 0us max 1us 0.461us rms\r\n\tint8 mul: 1000 events, 720us elapsed, 0.72us avg, min 0us max 1us 0.449us rms\r\n\tint8 div: 1000 events, 782us elapsed, 0.78us avg, min 0us max 1us 0.413us rms\r\n\tINFO  [tests] TEST PASSED: time_8bit_integers\r\n\r\n\tINFO  [tests] RUNNING TEST: time_16bit_integers\r\n\tint16 add: 1000 events, 738us elapsed, 0.74us avg, min 0us max 1us 0.440us rms\r\n\tint16 sub: 1000 events, 731us elapsed, 0.73us avg, min 1us max 1us 0.444us rms\r\n\tint16 mul: 1000 events, 708us elapsed, 0.71us avg, min 1us max 1us 0.455us rms\r\n\tint16 div: 1000 events, 763us elapsed, 0.76us avg, min 1us max 1us 0.425us rms\r\n\tINFO  [tests] TEST PASSED: time_16bit_integers\r\n\r\n\tINFO  [tests] RUNNING TEST: time_32bit_integers\r\n\tint32 add: 1000 events, 708us elapsed, 0.71us avg, min 1us max 1us 0.455us rms\r\n\tint32 sub: 1000 events, 722us elapsed, 0.72us avg, min 1us max 1us 0.448us rms\r\n\tint32 mul: 1000 events, 706us elapsed, 0.71us avg, min 0us max 1us 0.456us rms\r\n\tint32 div: 1000 events, 753us elapsed, 0.75us avg, min 1us max 1us 0.431us rms\r\n\tINFO  [tests] TEST PASSED: time_32bit_integers\r\n\r\n\tINFO  [tests] RUNNING TEST: time_64bit_integers\r\n\tint64 add: 1000 events, 820us elapsed, 0.82us avg, min 1us max 1us 0.384us rms\r\n\tint64 sub: 1000 events, 751us elapsed, 0.75us avg, min 1us max 1us 0.433us rms\r\n\tint64 mul: 1000 events, 740us elapsed, 0.74us avg, min 1us max 1us 0.439us rms\r\n\tint64 div: 1000 events, 1532us elapsed, 1.53us avg, min 1us max 2us 0.499us rms\r\n\tINFO  [tests] TEST PASSED: time_64bit_integers\r\n\r\n\tINFO  [tests] RUNNING TEST: time_px4_hrt\r\n\thrt_absolute_time(): 1000 events, 992us elapsed, 0.99us avg, min 1us max 1us 0.089us rms\r\n\thrt_elapsed_time(): 1000 events, 1232us elapsed, 1.23us avg, min 1us max 2us 0.422us rms\r\n\tINFO  [tests] TEST PASSED: time_px4_hrt\r\n\r\n\tINFO  [tests] ALL TESTS PASSED\r\n\tINFO  [tests]   Tests passed :      9\r\n\tINFO  [tests]   Tests failed :      0\r\n\tINFO  [tests]   Tested assertions : 0\r\n\tmicrobench PASSED\r\n","created_at":"2018-06-30T18:01:36Z","updated_at":"2018-06-30T18:01:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PX4/Firmware/pulls/9810/commits","review_comments_url":"https://api.github.com/repos/PX4/Firmware/pulls/9810/comments","review_comment_url":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/9810/comments","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/d948d0575b771ab3a81fbd081b10075971b8c565","head":{"label":"PX4:pr-microbench_test","ref":"pr-microbench_test","sha":"d948d0575b771ab3a81fbd081b10075971b8c565","user":{"login":"PX4","id":2096014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"repo":{"id":5298790,"node_id":"MDEwOlJlcG9zaXRvcnk1Mjk4Nzkw","name":"Firmware","full_name":"PX4/Firmware","owner":{"login":"PX4","id":2096014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PX4/Firmware","description":"PX4 Pro Autopilot Software","fork":false,"url":"https://api.github.com/repos/PX4/Firmware","forks_url":"https://api.github.com/repos/PX4/Firmware/forks","keys_url":"https://api.github.com/repos/PX4/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PX4/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PX4/Firmware/teams","hooks_url":"https://api.github.com/repos/PX4/Firmware/hooks","issue_events_url":"https://api.github.com/repos/PX4/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/PX4/Firmware/events","assignees_url":"https://api.github.com/repos/PX4/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/PX4/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/PX4/Firmware/tags","blobs_url":"https://api.github.com/repos/PX4/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PX4/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PX4/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/PX4/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/PX4/Firmware/languages","stargazers_url":"https://api.github.com/repos/PX4/Firmware/stargazers","contributors_url":"https://api.github.com/repos/PX4/Firmware/contributors","subscribers_url":"https://api.github.com/repos/PX4/Firmware/subscribers","subscription_url":"https://api.github.com/repos/PX4/Firmware/subscription","commits_url":"https://api.github.com/repos/PX4/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/PX4/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/PX4/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/PX4/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/PX4/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/PX4/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PX4/Firmware/merges","archive_url":"https://api.github.com/repos/PX4/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PX4/Firmware/downloads","issues_url":"https://api.github.com/repos/PX4/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/PX4/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/PX4/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/PX4/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PX4/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/PX4/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/PX4/Firmware/deployments","created_at":"2012-08-04T21:19:36Z","updated_at":"2018-06-29T21:42:22Z","pushed_at":"2018-06-30T17:43:03Z","git_url":"git://github.com/PX4/Firmware.git","ssh_url":"git@github.com:PX4/Firmware.git","clone_url":"https://github.com/PX4/Firmware.git","svn_url":"https://github.com/PX4/Firmware","homepage":"http://px4.io","size":100495,"stargazers_count":1792,"watchers_count":1792,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5295,"mirror_url":null,"archived":false,"open_issues_count":508,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":5295,"open_issues":508,"watchers":1792,"default_branch":"master"}},"base":{"label":"PX4:master","ref":"master","sha":"16d67ed179faea91cd41fc4dad4d7790126c1a3e","user":{"login":"PX4","id":2096014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"repo":{"id":5298790,"node_id":"MDEwOlJlcG9zaXRvcnk1Mjk4Nzkw","name":"Firmware","full_name":"PX4/Firmware","owner":{"login":"PX4","id":2096014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2096014?v=4","gravatar_id":"","url":"https://api.github.com/users/PX4","html_url":"https://github.com/PX4","followers_url":"https://api.github.com/users/PX4/followers","following_url":"https://api.github.com/users/PX4/following{/other_user}","gists_url":"https://api.github.com/users/PX4/gists{/gist_id}","starred_url":"https://api.github.com/users/PX4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PX4/subscriptions","organizations_url":"https://api.github.com/users/PX4/orgs","repos_url":"https://api.github.com/users/PX4/repos","events_url":"https://api.github.com/users/PX4/events{/privacy}","received_events_url":"https://api.github.com/users/PX4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PX4/Firmware","description":"PX4 Pro Autopilot Software","fork":false,"url":"https://api.github.com/repos/PX4/Firmware","forks_url":"https://api.github.com/repos/PX4/Firmware/forks","keys_url":"https://api.github.com/repos/PX4/Firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PX4/Firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PX4/Firmware/teams","hooks_url":"https://api.github.com/repos/PX4/Firmware/hooks","issue_events_url":"https://api.github.com/repos/PX4/Firmware/issues/events{/number}","events_url":"https://api.github.com/repos/PX4/Firmware/events","assignees_url":"https://api.github.com/repos/PX4/Firmware/assignees{/user}","branches_url":"https://api.github.com/repos/PX4/Firmware/branches{/branch}","tags_url":"https://api.github.com/repos/PX4/Firmware/tags","blobs_url":"https://api.github.com/repos/PX4/Firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PX4/Firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PX4/Firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/PX4/Firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PX4/Firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/PX4/Firmware/languages","stargazers_url":"https://api.github.com/repos/PX4/Firmware/stargazers","contributors_url":"https://api.github.com/repos/PX4/Firmware/contributors","subscribers_url":"https://api.github.com/repos/PX4/Firmware/subscribers","subscription_url":"https://api.github.com/repos/PX4/Firmware/subscription","commits_url":"https://api.github.com/repos/PX4/Firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/PX4/Firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/PX4/Firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/PX4/Firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/PX4/Firmware/contents/{+path}","compare_url":"https://api.github.com/repos/PX4/Firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PX4/Firmware/merges","archive_url":"https://api.github.com/repos/PX4/Firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PX4/Firmware/downloads","issues_url":"https://api.github.com/repos/PX4/Firmware/issues{/number}","pulls_url":"https://api.github.com/repos/PX4/Firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/PX4/Firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/PX4/Firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PX4/Firmware/labels{/name}","releases_url":"https://api.github.com/repos/PX4/Firmware/releases{/id}","deployments_url":"https://api.github.com/repos/PX4/Firmware/deployments","created_at":"2012-08-04T21:19:36Z","updated_at":"2018-06-29T21:42:22Z","pushed_at":"2018-06-30T17:43:03Z","git_url":"git://github.com/PX4/Firmware.git","ssh_url":"git@github.com:PX4/Firmware.git","clone_url":"https://github.com/PX4/Firmware.git","svn_url":"https://github.com/PX4/Firmware","homepage":"http://px4.io","size":100495,"stargazers_count":1792,"watchers_count":1792,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5295,"mirror_url":null,"archived":false,"open_issues_count":508,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":5295,"open_issues":508,"watchers":1792,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9810"},"html":{"href":"https://github.com/PX4/Firmware/pull/9810"},"issue":{"href":"https://api.github.com/repos/PX4/Firmware/issues/9810"},"comments":{"href":"https://api.github.com/repos/PX4/Firmware/issues/9810/comments"},"review_comments":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9810/comments"},"review_comment":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PX4/Firmware/pulls/9810/commits"},"statuses":{"href":"https://api.github.com/repos/PX4/Firmware/statuses/d948d0575b771ab3a81fbd081b10075971b8c565"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":253,"deletions":8,"changed_files":8}}
{"actor":{"display_login":"dagar"}}