Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
2kai2kai2 committed Nov 17, 2021
1 parent d6663e9 commit 07a7d4d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

bool cpuTimeCpp(const size_t& pid, size_t& user, size_t& kernel);

size_t memInfoCpp(const size_t &pid);
size_t memInfoCpp(const size_t& pid);
2 changes: 1 addition & 1 deletion lib_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Memory size in bytes
Linux uses a system where all memory is considered virtual memory stored with pages, and those addresses convert to physical (RAM) or 'virtual' memory on disk.
Retrieved from /proc/[pid]/statm
*/
size_t memInfoCpp(const size_t &pid) {
size_t memInfoCpp(const size_t& pid) {
std::ifstream file("/proc/" + std::to_string(pid) + "/statm");
// Check that this pid is valid
if (!file.good()) {
Expand Down
2 changes: 1 addition & 1 deletion lib_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bool cpuTimeCpp(const size_t& pid, size_t& user, size_t& kernel) {
Gets working set size (memory) in bytes. Includes both private and shared working sets.
Note that this is different from the value in the task manager, because that excludes the shared working set.
*/
size_t memInfoCpp(const size_t &pid) {
size_t memInfoCpp(const size_t& pid) {
HANDLE process = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, false, pid);
if (process == NULL) {
std::cerr << "Failed to open process " << pid << " with PROCESS_QUERY_LIMITED_INFORMATION when getting memory data." << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
"name": "kaih2o",
"url": "https://github.com/2kai2kai2"
},
"version": "1.0.12",
"version": "1.1.0",
"keywords": [
"process",
"processes",
"ps",
"pid",
"lookup"
"lookup",
"usage",
"resource",
"performance",
"memory",
"cpu"
],
"repository": {
"url": "https://github.com/2kai2kai2/node-ps-data"
Expand Down

0 comments on commit 07a7d4d

Please sign in to comment.