bencheeorg / bencheeorg/benchee

Chained CPU determination lookup

Open
#109 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Elixir
Stars
1.5k
Forks
70
PR merge metrics
No merged PRs in 30d

Description

There's a lot of discussion of this topic in #108 . It's not a high priority now but I wanted to log the issue :) Oh yeah, this concerns Linux for now.

Basically, we got lots of different places where depending on the system we might get better or worse information (or none at all). Atm we use `proc/cpuinfo` but that might be hard to parse/architecture dependent. `/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq` is pretty cool but normal users don't always have access. `lscpu` might also work.

An idea would be that we perform a chained lookup like try `sys/...` first and see if we find good enough information, otherwise try another method and so on...

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the current /proc/cpuinfo lookup, then compare the Linux sources mentioned here: /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq and lscpu. The issue is done when CPU information can be obtained through an ordered fallback across these sources, including when a normal user cannot access the sysfs path.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir, linux
Domain
operating-systems, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.