hemokit data has higher time stdev than emokit
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- performance
Research direction
Start by comparing the timing around emokit_read_data_timeout with the hemokit-dump main loop and readEmotivRaw, using the gettimeofday and getCurrentTime measurements described in the issue. The issue notes that the Hemokit comparison is not yet fair; first establish equivalent measurement points, then document the cause of the higher variance and the expected correction.
Written by the indexing model from the issue text.
Description
I've taken some rough measurements of how long emokit_read_data_timeout and hemokit-dump's main loop take per iteration.
For this I modified:
int emokit_read_data_timeout(struct emokit_device* s, unsigned timeout)
{
static uint64_t t_before = 0;
struct timeval tv;
gettimeofday(&tv, NULL);
uint64_t t = ((uint64_t) tv.tv_sec)*1000000 + (uint64_t) tv.tv_usec;
fprintf(stderr, "%lu\n", t - t_before);
t_before = t;
return hid_read_timeout(s->_dev, s->raw_frame, 32, timeout);
}
Results (times in microseconds):
| emokit (gettimeofday) | hemokit (getCurrentTime) | |
|---|---|---|
| mean | 7818.57 | 7662.45 |
| std | 410.32 | 725.25 |
| std/mean | ~5.2 % | 9.5 % |
So the distance between time measurements varies quite a bit more in Hemokit.
This wasn't measured properly though on the Hemokit side; for it to be a fair comparison, I should measure how long readEmotivRaw takes, not the time of a hemokit-dump loop.
- Dominant language
- Haskell
- Stars
- 32
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nh2/hemokit
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Web.Scotty.Trans.Lazy.setHeader calls addHeader instead of setHeaderPossibly taken @tusharad claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
scotty-web/scotty#436 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
input-output-hk/haskell.nix#2617 ·
-
easy first-contributor first-contributors good first issue haskell help wanted up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
fork-commit-merge/fork-commit-merge#8455 ·
Maintainers usually reply within 1 day
-
new tool
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
dense-analysis/ale#5176 ·
-
infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
alunduil/siren-json.hs#278 ·
Maintainers usually reply within 1 day