wjones127 commented on a change in pull request #12077:
URL: https://github.com/apache/arrow/pull/12077#discussion_r779632641



##########
File path: python/pyarrow/__init__.py
##########
@@ -75,19 +77,74 @@ def show_versions():
     """
     Print various version information, to help with error reporting.
     """
-    # TODO: CPU information and flags
+    def print_entry(label, value):
+        print(f"{label: <26}: {value: <8}")
+
     print("pyarrow version info\n--------------------")
-    print("Package kind: {}".format(cpp_build_info.package_kind
-                                    if len(cpp_build_info.package_kind) > 0
-                                    else "not indicated"))
-    print("Arrow C++ library version: {0}".format(cpp_build_info.version))
-    print("Arrow C++ compiler: {0} {1}"
-          .format(cpp_build_info.compiler_id, cpp_build_info.compiler_version))
-    print("Arrow C++ compiler flags: {0}"
-          .format(cpp_build_info.compiler_flags))
-    print("Arrow C++ git revision: {0}".format(cpp_build_info.git_id))
-    print("Arrow C++ git description: {0}"
-          .format(cpp_build_info.git_description))
+    print_entry("Package kind", cpp_build_info.package_kind
+                if len(cpp_build_info.package_kind) > 0
+                else "not indicated")
+    print_entry("Arrow C++ library version", cpp_build_info.version)
+    print_entry("Arrow C++ compiler",
+                f"{cpp_build_info.compiler_id} 
{cpp_build_info.compiler_version}")
+    print_entry("Arrow C++ compiler flags", cpp_build_info.compiler_flags)
+    print_entry("Arrow C++ git revision", cpp_build_info.git_id)
+    print_entry("Arrow C++ git description", cpp_build_info.git_description)
+
+
+def arrow_info():
+    """
+    Print detailed version and platform information, for error reporting
+    """
+    show_versions()
+
+    def print_entry(label, value):
+        print(f"  {label: <20}: {value: <8}")
+
+    print("\nPlatform:")
+    print_entry("OS / Arch", f"{platform.system()} {platform.machine()}")
+    print_entry("SIMD Level", runtime_info().simd_level)
+    print_entry("Detected SIMD Level", runtime_info().detected_simd_level)
+
+    pool = default_memory_pool()

Review comment:
       The way we suggest changing memory pools in the docs is [set an 
environment variable that changes the 
default](https://arrow.apache.org/docs/cpp/memory.html#overriding-the-default-memory-pool).
 So we'll capture that well here.
   
   You *can* pass a different pool to individual functions. We'll miss those 
allocations here, but since we show which allocator we are tracking, I think 
that's fine. It's at least clear about which allocator it's showing.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to