Skip to content

Commit

Permalink
Update package for Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
manzik committed Oct 7, 2024
1 parent 94a2390 commit 41e26ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 0 additions & 7 deletions cmdbench/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,11 @@ def collect_time_series(shared_process_dict):

print("Root access is needed for monitoring the target command.")
raise access_denied_error
break
except psutil.NoSuchProcess as e:
# The process might end while we are measuring resources
pass
except Exception as e:
raise e
break

# psutil calculates children usage for us on linux. Otherwise we calculate and pass it to the main thread.
if not is_linux:
Expand All @@ -291,8 +289,6 @@ def collect_time_series(shared_process_dict):
children_user_cpu_time += cpu_time[0]
children_system_cpu_time += cpu_time[1]

print(children_user_cpu_time)

shared_process_dict["children_user_cpu_time"] = children_user_cpu_time
shared_process_dict["children_system_cpu_time"] = children_system_cpu_time

Expand Down Expand Up @@ -323,9 +319,6 @@ def single_benchmark_command_raw(command):
# Disk
disk_io_counters = None

# Program outputs
process_output_lines, process_error_lines = [], []

# Time series data
# We don't need fast read access, we need fast insertion so we use deque
sample_milliseconds, cpu_percentages, memory_values = deque([]), deque([]), deque([])
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cmdbench"
version = "0.1.20"
version = "0.1.21"
description = "Quick and easy benchmarking for any command's CPU, memory, disk usage and runtime."
authors = ["Mohsen Yousefian <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -29,6 +29,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
packages = [{include = "cmdbench"}]

Expand Down

0 comments on commit 41e26ae

Please sign in to comment.