pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

actor-framework: fix solaris process metrics



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%pkgsrc.org@localhost>
Pushed By:	nros
Date:		Sun Jan 9 21:37:55 2022 +0100
Changeset:	e515f761e7ac6a414d4817b1c208a0400d65ac99

Modified Files:
	actor-framework/distinfo
	actor-framework/patches/patch-libcaf__core_src_telemetry_importer_process.cpp

Log Message:
actor-framework: fix solaris process metrics

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e515f761e7ac6a414d4817b1c208a0400d65ac99

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 actor-framework/distinfo                                       |  2 +-
 .../patch-libcaf__core_src_telemetry_importer_process.cpp      | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)

diffs:
diff --git a/actor-framework/distinfo b/actor-framework/distinfo
index 996f8155f5..8d09a25ce8 100644
--- a/actor-framework/distinfo
+++ b/actor-framework/distinfo
@@ -10,6 +10,6 @@ SHA1 (patch-libcaf__core_src_detail_get__mac__addresses.cpp) = 509e8081f66cebe93
 SHA1 (patch-libcaf__core_src_detail_get__root__uuid.cpp) = ba158be8761dfe0dc5705de48c885e4cc9739743
 SHA1 (patch-libcaf__core_src_detail_pretty__type__name.cpp) = 922423499220ba8481da6076877fb755ab49c569
 SHA1 (patch-libcaf__core_src_detail_set__thread__name.cpp) = fb3cfefb1eccbf77ccf65173f1cfeb1e71b2e875
-SHA1 (patch-libcaf__core_src_telemetry_importer_process.cpp) = 00215e17c6536d7e90abd54871fbbeb9842955bd
+SHA1 (patch-libcaf__core_src_telemetry_importer_process.cpp) = 1c805a05d3154b4e637e0a10bece33797e4d5cae
 SHA1 (patch-libcaf__core_test_scheduled__actor.cpp) = c16b336c67173b4d8c562b624fadf4443ae27005
 SHA1 (patch-libcaf__io_CMakeLists.txt) = 327649d0fef862e75a5367d38e1baf769923c9f0
diff --git a/actor-framework/patches/patch-libcaf__core_src_telemetry_importer_process.cpp b/actor-framework/patches/patch-libcaf__core_src_telemetry_importer_process.cpp
index 9a2caa49d1..3da556f1c9 100644
--- a/actor-framework/patches/patch-libcaf__core_src_telemetry_importer_process.cpp
+++ b/actor-framework/patches/patch-libcaf__core_src_telemetry_importer_process.cpp
@@ -13,7 +13,7 @@ $NetBSD$
  #  define CAF_HAS_PROCESS_METRICS
  #endif
  
-@@ -212,6 +212,92 @@ sys_stats read_sys_stats() {
+@@ -212,6 +212,90 @@ sys_stats read_sys_stats() {
  
  #endif // CAF_LINUX
  
@@ -37,19 +37,17 @@ $NetBSD$
 +    auto rd = fread(&ppsi, sizeof(ppsi), 1, f);
 +    fclose(f);
 +    if (rd != 1) {
-+       CAF_LOG_ERROR("failed to read content of " + procfs_path);
++       CAF_LOG_ERROR("failed to read content of" << procfs_path);
 +       return result;
 +    }
 +
 +    result.rss = static_cast<int64_t>(ppsi.pr_rssize) * 1024;
 +    result.vms = static_cast<int64_t>(ppsi.pr_size) * 1024;
 +    result.cpu_time = ppsi.pr_time.tv_sec;
-+    if (ppsi.pr_time.tv_nsec > 500000000) {
-+      result.cpu_time += 1;
-+    }
++    result.cpu_time += static_cast<double>(ppsi.pr_time.tv_nsec) / 1000000000;
 +  }
 +  else {
-+    CAF_LOG_ERROR("failed to open file " + procfs_path);
++    CAF_LOG_ERROR("failed to open file" << procfs_path);
 +  }
 +
 +  return result;


Home | Main Index | Thread Index | Old Index