-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance Intel NPU monitoring tool with real-time visualization and im…
…proved functionality - Updated README to reflect the new features and installation instructions. - Introduced a curses-based interface for real-time monitoring of Intel Meteor Lake NPU usage. - Added support for historical data visualization with an ASCII bar chart. - Implemented error handling for device path access and improved data reading methods. - Refactored code for better organization and maintainability, including the addition of a standalone script. - Enhanced device information display and usage tracking capabilities.
- Loading branch information
1 parent
bce0ca3
commit 700c4f7
Showing
13 changed files
with
457 additions
and
81 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data_mtime":1734329699,"dep_lines":[1,2,3,4,1,1,1,1,1],"dep_prios":[10,5,5,5,5,30,30,30,30],"dependencies":["sys","_typeshed","typing","typing_extensions","builtins","abc","importlib","importlib.machinery","types"],"hash":"a9f716c78e76cc3a7c2c7a2b9fc8336f09f6aeb5691223b0a090b3f4653bac6e","id":"_curses","ignore_all":true,"interface_hash":"ea2002d17e67518aa83cbf4894136d636ad847833125e3bc7316224a9d3c0ab2","mtime":1728674377,"options":{"allow_redefinition":false,"allow_untyped_globals":false,"always_false":[],"always_true":[],"bazel":false,"check_untyped_defs":false,"disable_bytearray_promotion":false,"disable_error_code":[],"disable_memoryview_promotion":false,"disabled_error_codes":[],"disallow_any_decorated":false,"disallow_any_explicit":false,"disallow_any_expr":false,"disallow_any_generics":false,"disallow_any_unimported":false,"disallow_incomplete_defs":false,"disallow_subclassing_any":false,"disallow_untyped_calls":false,"disallow_untyped_decorators":false,"disallow_untyped_defs":false,"enable_error_code":[],"enabled_error_codes":[],"extra_checks":false,"follow_imports":"normal","follow_imports_for_stubs":false,"ignore_errors":false,"ignore_missing_imports":false,"implicit_optional":false,"implicit_reexport":true,"local_partial_types":false,"mypyc":false,"old_type_inference":false,"platform":"darwin","plugins":[],"strict_concatenate":false,"strict_equality":false,"strict_optional":true,"warn_no_return":true,"warn_return_any":false,"warn_unreachable":false,"warn_unused_ignores":false},"path":"/Users/davidmontgomery/.cursor/extensions/ms-python.mypy-type-checker-2024.0.0/bundled/libs/mypy/typeshed/stdlib/_curses.pyi","plugin_data":null,"size":15346,"suppressed":[],"version_id":"1.11.2"} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data_mtime":1734329699,"dep_lines":[3,1,4,5,1,1,1,1],"dep_prios":[5,5,5,5,5,30,30,30],"dependencies":["collections.abc","_curses","typing","typing_extensions","builtins","abc","importlib","importlib.machinery"],"hash":"06c265d7595fecaaf5b422afae2f27e9a53dd96714e77210c867d760ea42f35f","id":"curses","ignore_all":true,"interface_hash":"063ae9e16d1c3babc06460b2abd1eb93554603d2fde581263e1bd42b448decd1","mtime":1728674378,"options":{"allow_redefinition":false,"allow_untyped_globals":false,"always_false":[],"always_true":[],"bazel":false,"check_untyped_defs":false,"disable_bytearray_promotion":false,"disable_error_code":[],"disable_memoryview_promotion":false,"disabled_error_codes":[],"disallow_any_decorated":false,"disallow_any_explicit":false,"disallow_any_expr":false,"disallow_any_generics":false,"disallow_any_unimported":false,"disallow_incomplete_defs":false,"disallow_subclassing_any":false,"disallow_untyped_calls":false,"disallow_untyped_decorators":false,"disallow_untyped_defs":false,"enable_error_code":[],"enabled_error_codes":[],"extra_checks":false,"follow_imports":"normal","follow_imports_for_stubs":false,"ignore_errors":false,"ignore_missing_imports":false,"implicit_optional":false,"implicit_reexport":true,"local_partial_types":false,"mypyc":false,"old_type_inference":false,"platform":"darwin","plugins":[],"strict_concatenate":false,"strict_equality":false,"strict_optional":true,"warn_no_return":true,"warn_return_any":false,"warn_unreachable":false,"warn_unused_ignores":false},"path":"/Users/davidmontgomery/.cursor/extensions/ms-python.mypy-type-checker-2024.0.0/bundled/libs/mypy/typeshed/stdlib/curses/__init__.pyi","plugin_data":null,"size":653,"suppressed":[],"version_id":"1.11.2"} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data_mtime":1734329699,"dep_lines":[1,2,3,4,5,1,1,1,1,1],"dep_prios":[10,5,5,5,5,5,30,30,30,30],"dependencies":["sys","abc","time","typing","typing_extensions","builtins","_typeshed","importlib","importlib.machinery","types"],"hash":"271de4b7d82b68d67accfd38c478231813caac38cfa1b0440b4d2c20df4f5732","id":"datetime","ignore_all":true,"interface_hash":"b6149d0c60d8f62d464b3045caae7c75d90efd76a490e2e14dfa39a5a23c0262","mtime":1728674378,"options":{"allow_redefinition":false,"allow_untyped_globals":false,"always_false":[],"always_true":[],"bazel":false,"check_untyped_defs":false,"disable_bytearray_promotion":false,"disable_error_code":[],"disable_memoryview_promotion":false,"disabled_error_codes":[],"disallow_any_decorated":false,"disallow_any_explicit":false,"disallow_any_expr":false,"disallow_any_generics":false,"disallow_any_unimported":false,"disallow_incomplete_defs":false,"disallow_subclassing_any":false,"disallow_untyped_calls":false,"disallow_untyped_decorators":false,"disallow_untyped_defs":false,"enable_error_code":[],"enabled_error_codes":[],"extra_checks":false,"follow_imports":"normal","follow_imports_for_stubs":false,"ignore_errors":false,"ignore_missing_imports":false,"implicit_optional":false,"implicit_reexport":true,"local_partial_types":false,"mypyc":false,"old_type_inference":false,"platform":"darwin","plugins":[],"strict_concatenate":false,"strict_equality":false,"strict_optional":true,"warn_no_return":true,"warn_return_any":false,"warn_unreachable":false,"warn_unused_ignores":false},"path":"/Users/davidmontgomery/.cursor/extensions/ms-python.mypy-type-checker-2024.0.0/bundled/libs/mypy/typeshed/stdlib/datetime.pyi","plugin_data":null,"size":11844,"suppressed":[],"version_id":"1.11.2"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{".class":"MypyFile","_fullname":"intel_npu_top.STANDALONE","future_import_flags":[],"is_partial_stub_package":false,"is_stub":false,"names":{".class":"SymbolTable","BOX":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.BOX","name":"BOX","type":{".class":"Instance","args":["builtins.str","builtins.str"],"extra_attrs":null,"type_ref":"builtins.dict"}}},"DEVICE_INFO_PATHS":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.DEVICE_INFO_PATHS","name":"DEVICE_INFO_PATHS","type":{".class":"Instance","args":["builtins.str","builtins.str"],"extra_attrs":null,"type_ref":"builtins.dict"}}},"GRAPH_CHARS":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.GRAPH_CHARS","name":"GRAPH_CHARS","type":{".class":"Instance","args":["builtins.str"],"extra_attrs":null,"type_ref":"builtins.list"}}},"GRAPH_HEIGHT":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready","is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.GRAPH_HEIGHT","name":"GRAPH_HEIGHT","type":"builtins.int"}},"HISTORY_LENGTH":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready","is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.HISTORY_LENGTH","name":"HISTORY_LENGTH","type":"builtins.int"}},"NPU_DEVICE_DIR":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready","is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.NPU_DEVICE_DIR","name":"NPU_DEVICE_DIR","type":"builtins.str"}},"NPU_DEVICE_FILE":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready","is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.NPU_DEVICE_FILE","name":"NPU_DEVICE_FILE","type":"builtins.str"}},"NPU_RUNTIME_PATH":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.NPU_RUNTIME_PATH","name":"NPU_RUNTIME_PATH","type":"builtins.str"}},"REFRESH_RATE":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready","is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.REFRESH_RATE","name":"REFRESH_RATE","type":"builtins.int"}},"USAGE_GAUGE":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_inferred","has_explicit_value"],"fullname":"intel_npu_top.STANDALONE.USAGE_GAUGE","name":"USAGE_GAUGE","type":{".class":"Instance","args":["builtins.str"],"extra_attrs":null,"type_ref":"builtins.list"}}},"__annotations__":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready"],"fullname":"intel_npu_top.STANDALONE.__annotations__","name":"__annotations__","type":{".class":"Instance","args":["builtins.str",{".class":"AnyType","missing_import_name":null,"source_any":null,"type_of_any":6}],"extra_attrs":null,"type_ref":"builtins.dict"}}},"__doc__":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready"],"fullname":"intel_npu_top.STANDALONE.__doc__","name":"__doc__","type":"builtins.str"}},"__file__":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready"],"fullname":"intel_npu_top.STANDALONE.__file__","name":"__file__","type":"builtins.str"}},"__name__":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready"],"fullname":"intel_npu_top.STANDALONE.__name__","name":"__name__","type":"builtins.str"}},"__package__":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready"],"fullname":"intel_npu_top.STANDALONE.__package__","name":"__package__","type":"builtins.str"}},"__spec__":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"Var","flags":["is_ready"],"fullname":"intel_npu_top.STANDALONE.__spec__","name":"__spec__","type":"importlib.machinery.ModuleSpec"}},"curses":{".class":"SymbolTableNode","cross_ref":"curses","kind":"Gdef"},"datetime":{".class":"SymbolTableNode","cross_ref":"datetime.datetime","kind":"Gdef"},"draw_box":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"FuncDef","abstract_status":0,"arg_kinds":[0,0,0,0,0,1],"arg_names":["win","y","x","height","width","title"],"dataclass_transform_spec":null,"flags":[],"fullname":"intel_npu_top.STANDALONE.draw_box","name":"draw_box","type":null}},"draw_usage_bar":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"FuncDef","abstract_status":0,"arg_kinds":[0,0,0,0,0],"arg_names":["win","y","x","width","percentage"],"dataclass_transform_spec":null,"flags":[],"fullname":"intel_npu_top.STANDALONE.draw_usage_bar","name":"draw_usage_bar","type":null}},"get_process_info":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"FuncDef","abstract_status":0,"arg_kinds":[0],"arg_names":["device_file"],"dataclass_transform_spec":null,"flags":[],"fullname":"intel_npu_top.STANDALONE.get_process_info","name":"get_process_info","type":null}},"main":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"FuncDef","abstract_status":0,"arg_kinds":[0],"arg_names":["stdscr"],"dataclass_transform_spec":null,"flags":[],"fullname":"intel_npu_top.STANDALONE.main","name":"main","type":null}},"os":{".class":"SymbolTableNode","cross_ref":"os","kind":"Gdef"},"read_runtime":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"FuncDef","abstract_status":0,"arg_kinds":[],"arg_names":[],"dataclass_transform_spec":null,"flags":[],"fullname":"intel_npu_top.STANDALONE.read_runtime","name":"read_runtime","type":null}},"read_sysfs_value":{".class":"SymbolTableNode","kind":"Gdef","node":{".class":"FuncDef","abstract_status":0,"arg_kinds":[0],"arg_names":["path"],"dataclass_transform_spec":null,"flags":[],"fullname":"intel_npu_top.STANDALONE.read_sysfs_value","name":"read_sysfs_value","type":null}},"subprocess":{".class":"SymbolTableNode","cross_ref":"subprocess","kind":"Gdef"},"time":{".class":"SymbolTableNode","cross_ref":"time","kind":"Gdef"}},"path":"/Users/davidmontgomery/intel-npu-top/intel_npu_top/STANDALONE.py"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"data_mtime":1734329739,"dep_lines":[2,3,4,5,6,1,1,1,1,1,1,1,1,1],"dep_prios":[10,10,10,10,5,5,30,30,30,30,30,30,30,30],"dependencies":["time","os","curses","subprocess","datetime","builtins","_curses","_typeshed","abc","importlib","importlib.machinery","io","typing","typing_extensions"],"hash":"4127674bd0fb49e019c79f51bef52ee4f2dfcb95cb9685a418d256af9cf1d355","id":"intel_npu_top.STANDALONE","ignore_all":false,"interface_hash":"6ed5b874901a5cbbf686d8dee3531ff7ad3ebf79524b2770eaf068baead7e1b5","mtime":1734329739,"options":{"allow_redefinition":false,"allow_untyped_globals":false,"always_false":[],"always_true":[],"bazel":false,"check_untyped_defs":false,"disable_bytearray_promotion":false,"disable_error_code":[],"disable_memoryview_promotion":false,"disabled_error_codes":[],"disallow_any_decorated":false,"disallow_any_explicit":false,"disallow_any_expr":false,"disallow_any_generics":false,"disallow_any_unimported":false,"disallow_incomplete_defs":false,"disallow_subclassing_any":false,"disallow_untyped_calls":false,"disallow_untyped_decorators":false,"disallow_untyped_defs":false,"enable_error_code":[],"enabled_error_codes":[],"extra_checks":false,"follow_imports":"normal","follow_imports_for_stubs":false,"ignore_errors":false,"ignore_missing_imports":false,"implicit_optional":false,"implicit_reexport":true,"local_partial_types":false,"mypyc":false,"old_type_inference":false,"platform":"darwin","plugins":[],"strict_concatenate":false,"strict_equality":false,"strict_optional":true,"warn_no_return":true,"warn_return_any":false,"warn_unreachable":false,"warn_unused_ignores":false},"path":"/Users/davidmontgomery/intel-npu-top/intel_npu_top/STANDALONE.py","plugin_data":null,"size":7080,"suppressed":[],"version_id":"1.11.2"} |
Oops, something went wrong.