{"action":"created","issue":{"url":"https://api.github.com/repos/opentx/opentx/issues/2265","labels_url":"https://api.github.com/repos/opentx/opentx/issues/2265/labels{/name}","comments_url":"https://api.github.com/repos/opentx/opentx/issues/2265/comments","events_url":"https://api.github.com/repos/opentx/opentx/issues/2265/events","html_url":"https://github.com/opentx/opentx/issues/2265","id":73424342,"number":2265,"title":"Profiling/benchmarking the code on the target platform","user":{"login":"xmxwx","id":5033,"avatar_url":"https://avatars.githubusercontent.com/u/5033?v=3","gravatar_id":"","url":"https://api.github.com/users/xmxwx","html_url":"https://github.com/xmxwx","followers_url":"https://api.github.com/users/xmxwx/followers","following_url":"https://api.github.com/users/xmxwx/following{/other_user}","gists_url":"https://api.github.com/users/xmxwx/gists{/gist_id}","starred_url":"https://api.github.com/users/xmxwx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmxwx/subscriptions","organizations_url":"https://api.github.com/users/xmxwx/orgs","repos_url":"https://api.github.com/users/xmxwx/repos","events_url":"https://api.github.com/users/xmxwx/events{/privacy}","received_events_url":"https://api.github.com/users/xmxwx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/opentx/opentx/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/opentx/opentx/labels/Radio%20Firmware","name":"Radio Firmware","color":"5319e7"},{"url":"https://api.github.com/repos/opentx/opentx/labels/Wish","name":"Wish","color":"81F781"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-05T20:34:57Z","updated_at":"2015-05-17T18:57:39Z","closed_at":null,"body":"I plan to propose a code refactor (particularily #2257, but it applies to any bigger refactor), however, I'd like to be sure that the changes I made are not only correct but also don't introduce any performance degradation.\r\n\r\nI think it would be nice to have a possibility to benchmark some parts of the code on the target platform. I think about adding an optional compilation parameter which would enable instrumentation code which would use CPU timer to measure how long it takes to execute some routines. The measurements could be performed once on power-on, manually triggered via menu or remote triggered via serial port, with results displayed on LCD, sent through serial port or stored on EEPROM to be read via bootloader or avrdude.\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/opentx/opentx/issues/comments/102835487","html_url":"https://github.com/opentx/opentx/issues/2265#issuecomment-102835487","issue_url":"https://api.github.com/repos/opentx/opentx/issues/2265","id":102835487,"user":{"login":"projectkk2glider","id":5950438,"avatar_url":"https://avatars.githubusercontent.com/u/5950438?v=3","gravatar_id":"","url":"https://api.github.com/users/projectkk2glider","html_url":"https://github.com/projectkk2glider","followers_url":"https://api.github.com/users/projectkk2glider/followers","following_url":"https://api.github.com/users/projectkk2glider/following{/other_user}","gists_url":"https://api.github.com/users/projectkk2glider/gists{/gist_id}","starred_url":"https://api.github.com/users/projectkk2glider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectkk2glider/subscriptions","organizations_url":"https://api.github.com/users/projectkk2glider/orgs","repos_url":"https://api.github.com/users/projectkk2glider/repos","events_url":"https://api.github.com/users/projectkk2glider/events{/privacy}","received_events_url":"https://api.github.com/users/projectkk2glider/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T18:57:39Z","updated_at":"2015-05-17T18:57:39Z","body":"Sorry, forgot about this. \r\n\r\nTake a look at commit 328439525f2b3c6b3be2cf7466a2db96cb5bef15 from my branch https://github.com/projectkk2glider/opentx/tree/projectkk2glider/issue1849_delay_measuring\r\n\r\nIt contains a class DebugTimer which can measure the time of code execution. For short times (less than 30ms) it uses high precision timer and for higher times a low precision system tick timer."}}