Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Send memory usage information together with metrics on Linux #14

Merged
merged 4 commits into from Feb 20, 2022

Conversation

ruohola
Copy link
Member

@ruohola ruohola commented Feb 19, 2022

We handle only Linux since getting accurate memory usage values on it is
most important. Memory cannot be read platform independently in Python
and we don't want at this point to include any external dependencies,
such as psutil. We might want to add support for other systems when
the need arises for some user, it likely won't happen soon since since
production web servers are not often ran on non-Linux systems.

Good to note that MemAvailable in /proc/meminfo is only available on
Linux kernel 3.14 and up, but since 3.14 has already reached end of
life we can pretty safely ignore support for systems before it.

@ruohola ruohola force-pushed the memory-usage branch 3 times, most recently from 96c6290 to d54fdd2 Compare February 19, 2022 20:16
@ruohola ruohola changed the title Send memory usage information together with metrics Send memory usage information together with metrics on Linux Feb 19, 2022
@codecov
Copy link

codecov bot commented Feb 19, 2022

Codecov Report

Merging #14 (491681e) into master (161e9f4) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #14   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines           83       102   +19     
  Branches         7        10    +3     
=========================================
+ Hits            83       102   +19     
Impacted Files Coverage Δ
apilytics/core.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 161e9f4...491681e. Read the comment docs.

We handle only Linux since getting accurate memory usage values on it is
most important. Memory cannot be read platform independently in Python
and we don't want at this point to include any external dependencies,
such as `psutil`. We might want to add support for other systems when
the need arises for some user, it likely won't happen soon since since
production web servers are not often ran on non-Linux systems.

Good to note that `MemAvailable` in `/proc/meminfo` is only available on
Linux kernel 3.14 and up, but since 3.14 has already reached end of
life we can pretty safely ignore support for systems before it.
Now that we have operating system resource accessing functionality, we
really want to test against all the major operating systems.
@ruohola ruohola merged commit e3aeeca into master Feb 20, 2022
@ruohola ruohola deleted the memory-usage branch February 20, 2022 22:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants