Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /proc/interrupts support #475

Merged
merged 1 commit into from Dec 17, 2022
Merged

Conversation

Dentrax
Copy link
Contributor

@Dentrax Dentrax commented Nov 2, 2022

Signed-off-by: Furkan furkan.turkal@trendyol.com

I have some use-cases for this implementation:

  • want to parse my /proc/interrupts file using procfs package (with go:linkname)
  • move interrupt parsing logic from node_exporter to here
  • also supports single values

All tests passes.

@Dentrax Dentrax changed the title add /proc/interrupts Add /proc/interrupts support Nov 2, 2022
@Dentrax
Copy link
Contributor Author

Dentrax commented Nov 2, 2022

I was manually update the fixture so it fails. Now just followed Updating Test Fixtures instructions but I couldn't get exactly:

$ make fixtures/.unpacked
make: *** No rule to make target `fixtures/.unpacked'.  Stop.
$ make test
>> extracting fixtures testdata/fixtures
./ttar -C testdata/ -x -f testdata/fixtures.ttar
WARNING sed unable to handle null bytes, using Python (slow).

I almost waited ~5-10m but nothing happens, the process hangs, I guess. (macOS)

Feel free to commit my branch to update fixture!

Edit: It seems tests are now passing.

Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit about copyright dates. Otherwise LGTM.

proc_interrupts.go Outdated Show resolved Hide resolved
proc_interrupts_test.go Outdated Show resolved Hide resolved
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to update the dates.

Signed-off-by: Furkan <furkan.turkal@trendyol.com>
@Dentrax
Copy link
Contributor Author

Dentrax commented Dec 17, 2022

Just need to update the dates.

Done!

@SuperQ SuperQ merged commit 42aaf8e into prometheus:master Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants