guro 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
guro-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 DHANUSH KANDHAN
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
guro-0.1.0/MANIFEST.in ADDED
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include LICENSE
3
+ recursive-include guro *
guro-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,126 @@
1
+ Metadata-Version: 2.2
2
+ Name: guro
3
+ Version: 0.1.0
4
+ Summary: A Simple System Monitoring & Benchmarking Toolkit
5
+ Home-page: https://github.com/dhanushk-offl/guro
6
+ Author: Dhanush Kandhan
7
+ Author-email: dhanushkandhan75@gmail.com
8
+ Project-URL: Bug Reports, https://github.com/dhanushk-offl/guro/issues
9
+ Project-URL: Source, https://github.com/dhanushk-offl/guro
10
+ Project-URL: Documentation, https://github.com/dhanushk-offl/guro/wiki
11
+ Keywords: system-monitoring,gpu-optimization,performance-tuning,hardware-monitoring,system-administration,nvidia-gpu,amd-gpu,intel-gpu,resource-monitoring,system-optimization
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Operating System :: Microsoft :: Windows
16
+ Classifier: Operating System :: MacOS :: MacOS X
17
+ Classifier: Topic :: System :: Hardware
18
+ Classifier: Topic :: System :: Monitoring
19
+ Classifier: Topic :: System :: Systems Administration
20
+ Classifier: Topic :: System :: Operating System
21
+ Classifier: Topic :: System :: Hardware :: Hardware Drivers
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Intended Audience :: System Administrators
24
+ Classifier: Intended Audience :: Developers
25
+ Classifier: Development Status :: 4 - Beta
26
+ Classifier: Environment :: Console
27
+ Classifier: Natural Language :: English
28
+ Requires-Python: >=3.7
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: click>=8.0.0
32
+ Requires-Dist: rich>=10.0.0
33
+ Requires-Dist: psutil>=5.8.0
34
+ Requires-Dist: gputil>=1.4.0
35
+ Requires-Dist: matplotlib>=3.5.0
36
+ Requires-Dist: nvidia-ml-py>=11.515.0
37
+ Requires-Dist: pandas>=1.3.0
38
+ Requires-Dist: plotly>=5.5.0
39
+ Requires-Dist: termcolor>=2.0.0
40
+ Requires-Dist: tabulate>=0.8.9
41
+ Requires-Dist: py-cpuinfo>=8.0.0
42
+ Requires-Dist: setproctitle>=1.2.2
43
+ Requires-Dist: keyboard>=0.13.5
44
+ Requires-Dist: pytest>=7.0.0
45
+ Requires-Dist: pytest-mock>=3.10.0
46
+ Requires-Dist: pytest-cov>=4.0.0
47
+ Requires-Dist: pytest-timeout>=2.1.0
48
+ Provides-Extra: nvidia
49
+ Requires-Dist: py3nvml>=0.2.7; extra == "nvidia"
50
+ Requires-Dist: nvidia-ml-py>=11.515.0; extra == "nvidia"
51
+ Provides-Extra: amd
52
+ Requires-Dist: pyamdgpuinfo>=2.1.0; extra == "amd"
53
+ Provides-Extra: all
54
+ Requires-Dist: py3nvml>=0.2.7; extra == "all"
55
+ Requires-Dist: nvidia-ml-py>=11.515.0; extra == "all"
56
+ Requires-Dist: pyamdgpuinfo>=2.1.0; extra == "all"
57
+ Requires-Dist: matplotlib>=3.5.0; extra == "all"
58
+ Requires-Dist: plotly>=5.5.0; extra == "all"
59
+ Provides-Extra: test
60
+ Requires-Dist: pytest>=7.0.0; extra == "test"
61
+ Requires-Dist: pytest-mock>=3.10.0; extra == "test"
62
+ Requires-Dist: pytest-cov>=4.0.0; extra == "test"
63
+ Requires-Dist: pytest-timeout>=2.1.0; extra == "test"
64
+ Dynamic: author
65
+ Dynamic: author-email
66
+ Dynamic: classifier
67
+ Dynamic: description
68
+ Dynamic: description-content-type
69
+ Dynamic: home-page
70
+ Dynamic: keywords
71
+ Dynamic: project-url
72
+ Dynamic: provides-extra
73
+ Dynamic: requires-dist
74
+ Dynamic: requires-python
75
+ Dynamic: summary
76
+
77
+ # Guro - A Simple System Monitoring & Benchmarking Toolkit 🚀
78
+
79
+
80
+ Welcome to **Guro**, the ultimate toolkit for **system monitoring** and **benchmarking**. It’s simple, fast, and designed for developers and enthusiasts who want to monitor system performance, run benchmarks, and visualize system heatmaps in an intuitive way.
81
+
82
+ ### Features:
83
+ - 📊 **Real-time system monitoring** – Monitor CPU, memory, and disk usage in real-time.
84
+ - đŸ”Ĩ **Performance benchmarking** – Run benchmarks with mini and full-scale tests for your CPU and GPU.
85
+ - đŸŒĄī¸ **Hardware heatmap** – Visualize your system's temperature with a heatmap in real-time.
86
+ - 💾 **Export data** – Export monitoring data to CSV for analysis.
87
+
88
+ ### Installation
89
+
90
+ ```bash
91
+ pip install guro
92
+ ```
93
+
94
+ ### Usage
95
+
96
+ Run the following commands for monitoring, benchmarking, or heatmap analysis:
97
+
98
+ #### 1. **Monitor System Resources**
99
+ ```bash
100
+ guro monitor --interval 1.0 --duration 60
101
+ ```
102
+
103
+ #### 2. **Run Benchmark Tests**
104
+ ```bash
105
+ guro benchmark --type mini --cpu-only
106
+ ```
107
+
108
+ #### 3. **Visualize System Heatmap**
109
+ ```bash
110
+ guro heatmap --interval 1.0 --duration 30
111
+ ```
112
+
113
+ #### 4. **List All Commands**
114
+ ```bash
115
+ guro list
116
+ ```
117
+
118
+ For more details, check out our [documentation](https://github.com/dhanushk-offl/guro/wiki).
119
+
120
+ ### Demo
121
+
122
+ [Watch the demo video here](https://www.youtube.com/watch?v=xyz123)
123
+
124
+ ### License
125
+
126
+ MIT License. See LICENSE for more details.
guro-0.1.0/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # Guro - A Simple System Monitoring & Benchmarking Toolkit 🚀
2
+
3
+
4
+ Welcome to **Guro**, the ultimate toolkit for **system monitoring** and **benchmarking**. It’s simple, fast, and designed for developers and enthusiasts who want to monitor system performance, run benchmarks, and visualize system heatmaps in an intuitive way.
5
+
6
+ ### Features:
7
+ - 📊 **Real-time system monitoring** – Monitor CPU, memory, and disk usage in real-time.
8
+ - đŸ”Ĩ **Performance benchmarking** – Run benchmarks with mini and full-scale tests for your CPU and GPU.
9
+ - đŸŒĄī¸ **Hardware heatmap** – Visualize your system's temperature with a heatmap in real-time.
10
+ - 💾 **Export data** – Export monitoring data to CSV for analysis.
11
+
12
+ ### Installation
13
+
14
+ ```bash
15
+ pip install guro
16
+ ```
17
+
18
+ ### Usage
19
+
20
+ Run the following commands for monitoring, benchmarking, or heatmap analysis:
21
+
22
+ #### 1. **Monitor System Resources**
23
+ ```bash
24
+ guro monitor --interval 1.0 --duration 60
25
+ ```
26
+
27
+ #### 2. **Run Benchmark Tests**
28
+ ```bash
29
+ guro benchmark --type mini --cpu-only
30
+ ```
31
+
32
+ #### 3. **Visualize System Heatmap**
33
+ ```bash
34
+ guro heatmap --interval 1.0 --duration 30
35
+ ```
36
+
37
+ #### 4. **List All Commands**
38
+ ```bash
39
+ guro list
40
+ ```
41
+
42
+ For more details, check out our [documentation](https://github.com/dhanushk-offl/guro/wiki).
43
+
44
+ ### Demo
45
+
46
+ [Watch the demo video here](https://www.youtube.com/watch?v=xyz123)
47
+
48
+ ### License
49
+
50
+ MIT License. See LICENSE for more details.
guro-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
guro-0.1.0/setup.py ADDED
@@ -0,0 +1,101 @@
1
+ from setuptools import setup, find_packages
2
+ import sys
3
+
4
+ common_packages = [
5
+ 'click>=8.0.0',
6
+ 'rich>=10.0.0',
7
+ 'psutil>=5.8.0',
8
+ 'gputil>=1.4.0',
9
+ 'matplotlib>=3.5.0',
10
+ 'nvidia-ml-py>=11.515.0',
11
+ 'pandas>=1.3.0',
12
+ 'plotly>=5.5.0',
13
+ 'termcolor>=2.0.0',
14
+ 'tabulate>=0.8.9',
15
+ 'py-cpuinfo>=8.0.0',
16
+ 'setproctitle>=1.2.2',
17
+ 'keyboard>=0.13.5',
18
+ 'pytest>=7.0.0',
19
+ 'pytest-mock>=3.10.0',
20
+ 'pytest-cov>=4.0.0',
21
+ 'pytest-timeout>=2.1.0',
22
+ ]
23
+
24
+ if sys.platform.startswith('linux'):
25
+ common_packages.append('pyamdgpuinfo>=2.1.6')
26
+ common_packages.append('distro>=1.7.0')
27
+
28
+ # Test requirements
29
+ test_requires = [
30
+ 'pytest>=7.0.0',
31
+ 'pytest-mock>=3.10.0',
32
+ 'pytest-cov>=4.0.0',
33
+ 'pytest-timeout>=2.1.0',
34
+ ]
35
+
36
+ setup(
37
+ name="guro",
38
+ version="0.1.0",
39
+ packages=find_packages(where="src"),
40
+ package_dir={"": "src"},
41
+ install_requires=common_packages,
42
+ entry_points={
43
+ 'console_scripts': [
44
+ 'guro=guro.cli.main:cli',
45
+ ],
46
+ },
47
+ author="Dhanush Kandhan",
48
+ author_email="dhanushkandhan75@gmail.com",
49
+ description="A Simple System Monitoring & Benchmarking Toolkit",
50
+ long_description=open("README.md", encoding="utf-8").read(),
51
+ long_description_content_type="text/markdown",
52
+ url="https://github.com/dhanushk-offl/guro",
53
+ classifiers=[
54
+ "Programming Language :: Python :: 3",
55
+ "License :: OSI Approved :: MIT License",
56
+ "Operating System :: POSIX :: Linux",
57
+ "Operating System :: Microsoft :: Windows",
58
+ "Operating System :: MacOS :: MacOS X",
59
+ "Topic :: System :: Hardware",
60
+ "Topic :: System :: Monitoring",
61
+ "Topic :: System :: Systems Administration",
62
+ "Topic :: System :: Operating System",
63
+ "Topic :: System :: Hardware :: Hardware Drivers",
64
+ "Topic :: Software Development :: Libraries :: Python Modules",
65
+ "Intended Audience :: System Administrators",
66
+ "Intended Audience :: Developers",
67
+ "Development Status :: 4 - Beta",
68
+ "Environment :: Console",
69
+ "Natural Language :: English"
70
+ ],
71
+ python_requires=">=3.7",
72
+ keywords=[
73
+ "system-monitoring",
74
+ "gpu-optimization",
75
+ "performance-tuning",
76
+ "hardware-monitoring",
77
+ "system-administration",
78
+ "nvidia-gpu",
79
+ "amd-gpu",
80
+ "intel-gpu",
81
+ "resource-monitoring",
82
+ "system-optimization"
83
+ ],
84
+ project_urls={
85
+ "Bug Reports": "https://github.com/dhanushk-offl/guro/issues",
86
+ "Source": "https://github.com/dhanushk-offl/guro",
87
+ "Documentation": "https://github.com/dhanushk-offl/guro/wiki"
88
+ },
89
+ extras_require={
90
+ 'nvidia': ['py3nvml>=0.2.7', 'nvidia-ml-py>=11.515.0'],
91
+ 'amd': ['pyamdgpuinfo>=2.1.0'],
92
+ 'all': [
93
+ 'py3nvml>=0.2.7',
94
+ 'nvidia-ml-py>=11.515.0',
95
+ 'pyamdgpuinfo>=2.1.0',
96
+ 'matplotlib>=3.5.0',
97
+ 'plotly>=5.5.0'
98
+ ],
99
+ 'test': test_requires
100
+ }
101
+ )
@@ -0,0 +1,2 @@
1
+ # guro/__init__.py
2
+ __version__ = "1.0.0"
@@ -0,0 +1,4 @@
1
+ # guro/cli/__init__.py
2
+ from .main import cli
3
+
4
+ __all__ = ['cli']
@@ -0,0 +1,161 @@
1
+ import click
2
+ from rich.console import Console
3
+ from rich.panel import Panel
4
+ from rich.table import Table
5
+ from rich.prompt import Prompt, Confirm
6
+ from rich import print as rprint
7
+ from typing import Optional
8
+ from ..core.monitor import SystemMonitor
9
+ from ..core.benchmark import SafeSystemBenchmark
10
+ from ..core.heatmap import SystemHeatmap
11
+
12
+ console = Console()
13
+
14
+ def print_banner():
15
+ """Display the Guro banner"""
16
+ banner = """
17
+ [bold cyan]
18
+ ██████╗ ██╗ ██╗██████╗ ██████╗
19
+ ██╔════╝ ██║ ██║██╔══██╗██╔═══██╗
20
+ ██║ ███╗██║ ██║██████╔╝██║ ██║
21
+ ██║ ██║██║ ██║██╔══██╗██║ ██║
22
+ ╚██████╔╝╚██████╔╝██║ ██║╚██████╔╝
23
+ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝
24
+ [/bold cyan]
25
+ [yellow]A Simple System Monitoring & Benchmarking Toolkit[/yellow]
26
+ """
27
+ console.print(banner)
28
+
29
+ @click.group()
30
+ @click.version_option(version='1.0.0')
31
+ def cli():
32
+ """🚀 Guro - A Simple System Monitoring & Benchmarking Toolkit"""
33
+ print_banner()
34
+
35
+ @cli.command()
36
+ @click.option('--interval', '-i', default=1.0, help='Monitoring interval in seconds')
37
+ @click.option('--duration', '-d', default=None, type=int, help='Monitoring duration in seconds')
38
+ @click.option('--export', '-e', is_flag=True, help='Export monitoring data to CSV')
39
+ def monitor(interval: float, duration: Optional[int], export: bool):
40
+ """📊 Monitor system resources and performance in real-time"""
41
+ try:
42
+ monitor = SystemMonitor()
43
+ if export:
44
+ click.echo("📝 Monitoring data will be exported to 'monitoring_data.csv'")
45
+
46
+ with console.status("[bold green]Initializing system monitor..."):
47
+ monitor.run_performance_test(
48
+ interval=interval,
49
+ duration=duration,
50
+ export_data=export
51
+ )
52
+ except KeyboardInterrupt:
53
+ console.print("\n[yellow]Monitoring stopped by user[/yellow]")
54
+ except Exception as e:
55
+ console.print(f"\n[red]Error during monitoring: {str(e)}[/red]")
56
+
57
+ @cli.command()
58
+ @click.option('--type', '-t', 'test_type',
59
+ type=click.Choice(['mini', 'god'], case_sensitive=False),
60
+ help='Type of benchmark test to run')
61
+ @click.option('--gpu-only', is_flag=True, help='Run only GPU benchmark')
62
+ @click.option('--cpu-only', is_flag=True, help='Run only CPU benchmark')
63
+ def benchmark(test_type: str, gpu_only: bool, cpu_only: bool):
64
+ """đŸ”Ĩ Run system benchmarks"""
65
+ try:
66
+ benchmark = SafeSystemBenchmark()
67
+
68
+ if not test_type:
69
+ test_type = Prompt.ask(
70
+ "Select benchmark type",
71
+ choices=["mini", "god"],
72
+ default="mini"
73
+ )
74
+
75
+ with console.status("[bold green]Preparing benchmark..."):
76
+ if test_type == "mini":
77
+ benchmark.mini_test(gpu_only=gpu_only, cpu_only=cpu_only)
78
+ else:
79
+ benchmark.god_test(gpu_only=gpu_only, cpu_only=cpu_only)
80
+
81
+ except KeyboardInterrupt:
82
+ console.print("\n[yellow]Benchmark stopped by user[/yellow]")
83
+ except Exception as e:
84
+ console.print(Panel(
85
+ f"[red]Error during benchmark: {str(e)}[/red]",
86
+ title="âš ī¸ Benchmark Error",
87
+ border_style="red"
88
+ ))
89
+
90
+ @cli.command() # Added the cli decorator here
91
+ @click.option('--interval', '-i',
92
+ type=click.FloatRange(min=0.1, min_open=False),
93
+ default=1.0,
94
+ help='Update interval in seconds (must be greater than 0.1)')
95
+ @click.option('--duration', '-d',
96
+ type=click.IntRange(min=1, min_open=False),
97
+ default=10,
98
+ help='Duration to run in seconds (default: 10)')
99
+ def heatmap(interval: float, duration: int):
100
+ """đŸŒĄī¸ Display unified system temperature heatmap"""
101
+ try:
102
+ heatmap = SystemHeatmap()
103
+
104
+ with console.status("[bold green]Initializing system heatmap..."):
105
+ updates = heatmap.run(
106
+ interval=interval,
107
+ duration=duration
108
+ )
109
+
110
+ console.print(f"\n[green]Heatmap completed after {updates} updates[/green]")
111
+
112
+ except KeyboardInterrupt:
113
+ console.print("\n[yellow]Heatmap visualization stopped by user[/yellow]")
114
+ except Exception as e:
115
+ console.print(f"[red]Error during heatmap visualization: {str(e)}[/red]")
116
+
117
+ @cli.command(name='list')
118
+ def list_features():
119
+ """📋 List all available features and commands"""
120
+ table = Table(title="Guro Commands and Features")
121
+ table.add_column("Command", style="cyan")
122
+ table.add_column("Description", style="green")
123
+ table.add_column("Options", style="yellow")
124
+
125
+ commands = {
126
+ "monitor": ("📊 Real-time system monitoring", "-i/--interval, -d/--duration, -e/--export"),
127
+ "benchmark": ("đŸ”Ĩ System benchmarking", "-t/--type [mini/god], --gpu-only, --cpu-only"),
128
+ "heatmap": ("đŸŒĄī¸ Hardware Heatmap Analysis", "-i/--interval, -d/--duration"),
129
+ "about": ("â„šī¸ About Guro", "None"),
130
+ "list": ("📋 List all commands", "None")
131
+ }
132
+
133
+ for cmd, (desc, opts) in commands.items():
134
+ table.add_row(cmd, desc, opts)
135
+
136
+ console.print(table)
137
+
138
+ @cli.command(name='about')
139
+ def about():
140
+ """â„šī¸ Display information about Guro"""
141
+ about_text = """[bold cyan]Guro - A Simple System Monitoring & Benchmarking Toolkit[/bold cyan]
142
+
143
+ [green]Version:[/green] 1.0.0
144
+ [green]Author:[/green] Dhanush Kandhan
145
+ [green]License:[/green] MIT
146
+
147
+ đŸ› ī¸ A Simple powerful toolkit for system monitoring and benchmarking.
148
+
149
+ [yellow]Key Features:[/yellow]
150
+ â€ĸ 📊 Real-time system monitoring
151
+ â€ĸ 💾 Memory management
152
+ â€ĸ đŸ”Ĩ Performance benchmarking
153
+ â€ĸ đŸŒĄī¸ Hardware Heatmap Analysis
154
+
155
+ [blue]GitHub:[/blue] https://github.com/dhanushk-offl/guro
156
+ [blue]Documentation:[/blue] https://github.com/dhanushk-offl/guro/wiki"""
157
+
158
+ console.print(Panel(about_text, title="About Guro", border_style="blue"))
159
+
160
+ if __name__ == '__main__':
161
+ cli()
@@ -0,0 +1,3 @@
1
+ # guro/core/__init__.py
2
+ from .monitor import SystemMonitor
3
+ __all__ = ['SystemMonitor']