You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/29 03:45:07 UTC

[GitHub] [arrow] AlvinJ15 commented on a change in pull request #12702: ARROW-15062: [C++] Add memory information to current spans

AlvinJ15 commented on a change in pull request #12702:
URL: https://github.com/apache/arrow/pull/12702#discussion_r837028159



##########
File path: cpp/src/arrow/util/tracing_internal.cc
##########
@@ -184,6 +188,41 @@ opentelemetry::trace::Tracer* GetTracer() {
   return tracer.get();
 }
 
+int parseLine(char* line){
+  // This assumes that a digit will be found and the line ends in " Kb".
+  int i = strlen(line);
+  const char* p = line;
+  while (*p <'0' || *p > '9') p++;
+  line[i-3] = '\0';
+  i = atoi(p);
+  return i;
+}
+
+size_t GetMemoryUsedByProcess() { //Note: this value is in KB!

Review comment:
       The value obtained from the system. This function was re-implemented and documented in the io_utils.h

##########
File path: cpp/src/arrow/util/tracing_internal.h
##########
@@ -48,6 +48,12 @@ namespace tracing {
 ARROW_EXPORT
 opentelemetry::trace::Tracer* GetTracer();
 
+ARROW_EXPORT
+size_t GetMemoryUsed();
+
+ARROW_EXPORT
+size_t GetMemoryUsedByProcess();

Review comment:
       moved




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org