Skip to content

Commit d38add0

Browse files
committed
docs: more documents
1 parent 903982f commit d38add0

8 files changed

Lines changed: 691 additions & 60 deletions

File tree

README.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

docs/COMMANDS.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Commands
2+
3+
## Tracking Commands
4+
5+
### `/ptracker start`
6+
7+
Start tracking performance metrics.
8+
9+
```bash
10+
/ptracker start
11+
```
12+
13+
**Output:** Shows the file path where metrics will be saved.
14+
15+
### `/ptracker stop`
16+
17+
Stop tracking and display collected samples count.
18+
19+
```bash
20+
/ptracker stop
21+
```
22+
23+
### `/ptracker deviceinfo`
24+
25+
Display detailed device and system information.
26+
27+
```bash
28+
/ptracker deviceinfo
29+
```
30+
31+
**Shows:**
32+
- Device type (PC, Mac, Phone, etc.)
33+
- CPU model and cores
34+
- GPU model
35+
- Total memory
36+
- Operating system
37+
- Java version
38+
39+
## Configuration Commands
40+
41+
### `/ptracker config`
42+
43+
List all configuration options with their current values.
44+
45+
```bash
46+
/ptracker config
47+
```
48+
49+
### `/ptracker config <option>`
50+
51+
View the current value and default for a specific option.
52+
53+
```bash
54+
/ptracker config output_interval
55+
```
56+
57+
**Output:**
58+
```
59+
output_interval: 5 (default: 5)
60+
```
61+
62+
### `/ptracker config <option> <value>`
63+
64+
Set a configuration option value.
65+
66+
```bash
67+
/ptracker config output_interval 10
68+
/ptracker config chat_enabled true
69+
/ptracker config network_host localhost
70+
```
71+
72+
For detailed configuration options, see [Configuration](CONFIGURATION.md).

docs/CONFIGURATION.md

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# Configuration
2+
3+
## General Settings
4+
5+
### `output_interval`
6+
7+
- **Default:** `5`
8+
- **Range:** `1-3600` seconds
9+
10+
How often to collect and output performance metrics.
11+
12+
```bash
13+
/ptracker config output_interval 10
14+
```
15+
16+
### `chat_enabled`
17+
18+
- **Default:** `false`
19+
20+
Display real-time metrics in the chat bar.
21+
22+
```bash
23+
/ptracker config chat_enabled true
24+
```
25+
26+
### `export_enabled`
27+
28+
- **Default:** `true`
29+
30+
Save metrics to files for later analysis.
31+
32+
```bash
33+
/ptracker config export_enabled true
34+
```
35+
36+
### `export_directory`
37+
38+
- **Default:** `performance_data`
39+
40+
Directory where export files will be saved.
41+
42+
```bash
43+
/ptracker config export_directory my_metrics
44+
```
45+
46+
### `output_format`
47+
48+
- **Default:** `csv`
49+
- **Options:** `csv`, `json`, `yaml`
50+
51+
File format for exported metrics.
52+
53+
```bash
54+
/ptracker config output_format json
55+
```
56+
57+
### `binary_units`
58+
59+
- **Default:** `true`
60+
61+
Use binary (1024-based) units (MiB/GiB) instead of decimal (1000-based).
62+
63+
```bash
64+
/ptracker config binary_units true
65+
```
66+
67+
## Metrics Collection
68+
69+
### `collect_fps`
70+
71+
- **Default:** `true`
72+
73+
Collect client-side frame rate statistics.
74+
75+
```bash
76+
/ptracker config collect_fps true
77+
```
78+
79+
### `collect_tps`
80+
81+
- **Default:** `true`
82+
83+
Collect server-side ticks per second.
84+
85+
```bash
86+
/ptracker config collect_tps true
87+
```
88+
89+
### `collect_mspt`
90+
91+
- **Default:** `true`
92+
93+
Collect mean server tick time in milliseconds.
94+
95+
```bash
96+
/ptracker config collect_mspt true
97+
```
98+
99+
### `collect_heap`
100+
101+
- **Default:** `true`
102+
103+
Collect JVM heap memory usage.
104+
105+
```bash
106+
/ptracker config collect_heap true
107+
```
108+
109+
### `collect_cpu`
110+
111+
- **Default:** `true`
112+
113+
Collect system CPU usage percentage.
114+
115+
```bash
116+
/ptracker config collect_cpu true
117+
```
118+
119+
## Network Settings
120+
121+
### `network_enabled`
122+
123+
- **Default:** `false`
124+
125+
> [!WARNING]
126+
> Enable only if you understand the risks! This will expose your device information and metrics to the configured server.
127+
128+
```bash
129+
/ptracker config network_enabled true
130+
```
131+
132+
### `network_host`
133+
134+
- **Default:** `localhost`
135+
136+
Host for HTTP binding and UDP destination. Can be a hostname or IP address.
137+
138+
```bash
139+
/ptracker config network_host 192.168.1.100
140+
/ptracker config network_host myserver.com
141+
```
142+
143+
### `receiver_port`
144+
145+
- **Default:** `31415`
146+
147+
Local HTTP server port for `/api/deviceinfo` endpoint.
148+
149+
```bash
150+
/ptracker config receiver_port 31415
151+
```
152+
153+
### `sender_port`
154+
155+
- **Default:** `31416`
156+
157+
Port for sending metrics via UDP.
158+
159+
```bash
160+
/ptracker config sender_port 31416
161+
```
162+
163+
## In-Game Configuration
164+
165+
You can also configure settings via the Cloth Config for a graphical interface.

0 commit comments

Comments
 (0)