Skip to content

Commit 3f570dc

Browse files
committed
docs: update readme
1 parent 2b8ed88 commit 3f570dc

File tree

2 files changed

+36
-14
lines changed

2 files changed

+36
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This project was inspired by [node-tree-kill](https://github.com/pkrumins/node-t
2525

2626
The reason I created this is because I have a case where I need to stop grandchild processes.
2727
This is because the way to kill a grandchild process on the Windows platform is to use the `Win32` API to determine the process relationship and either kill them all (Kill Tree's implementation) or call the `taskkill` program.
28-
Even my program is more than __3x faster__ than `taskkill`.
28+
Even my program is more than __3-5x faster__ than `taskkill`. (see [bench](docs/bench.md))
2929

3030
---
3131

docs/bench.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,60 @@
1-
windows kill-tree
2-
target/release/kill_tree_cli.exe <process_id>
1+
# Kill Tree vs Taskkill
32

4-
windows taskkill
5-
C:\WINDOWS\system32\taskkill.exe /F /T /PID <process_id>
3+
## Results
64

7-
platform: windows, arch: x86_64, exe: target/release/kill_tree_cli.exe, count: 100, total_ms: 1616, average_ms: 16
8-
platform: windows, arch: x86_64, exe: C:\WINDOWS\system32\taskkill.exe, count: 100, total_ms: 6167, average_ms: 61
9-
faster 3.816212871287129x
5+
| App | Kill Count | Total (ms) | Average (ms) | Faster Than Taskkill |
6+
| --- | --- | --- | --- | --- |
7+
| Kill Tree | 100 | 1616 | 16 | 3.8x |
8+
| taskkill | 100 | 6167 | 61 | 1x |
109

11-
platform: windows, arch: x86_64, exe: target/release/kill_tree_cli.exe, count: 200, total_ms: 2635, average_ms: 13
12-
platform: windows, arch: x86_64, exe: C:\WINDOWS\system32\taskkill.exe, count: 200, total_ms: 13425, average_ms: 67
13-
faster 5.094876660341556x
10+
| App | Kill Count | Total (ms) | Average (ms) | Faster Than Taskkill |
11+
| --- | --- | --- | --- | --- |
12+
| Kill Tree | 200 | 2635 | 13 | 5x |
13+
| taskkill | 200 | 13425 | 67 | 1x |
1414

15-
platform: windows, arch: x86_64, exe: target/release/kill_tree_cli.exe, count: 300, total_ms: 4427, average_ms: 14
16-
platform: windows, arch: x86_64, exe: C:\WINDOWS\system32\taskkill.exe, count: 300, total_ms: 22351, average_ms: 74
17-
faster 5.048791506663655x
15+
| App | Kill Count | Total (ms) | Average (ms) | Faster Than Taskkill |
16+
| --- | --- | --- | --- | --- |
17+
| Kill Tree | 300 | 4427 | 14 | 5x |
18+
| taskkill | 300 | 22351 | 74 | 1x |
19+
20+
## Executable
21+
22+
### Kill Tree
23+
24+
build: `cargo build --package kill_tree_cli --bins --release`
25+
executable: `target/release/kill_tree_cli.exe` <process_id>
26+
27+
### Taskkill
28+
29+
excutable: `C:\WINDOWS\system32\taskkill.exe /F /T /PID` <process_id>
30+
31+
## Environment
32+
33+
### CPU
1834

1935
```sh
2036
# wmic cpu get NumberOfCores,NumberOfLogicalProcessors
2137
NumberOfCores NumberOfLogicalProcessors
2238
8 16
2339
```
2440

41+
### Memory
42+
2543
```sh
2644
# systeminfo | findstr /C:"Total Physical Memory"
2745
Total Physical Memory: 16,270 MB
2846
```
2947

48+
### OS Version
49+
3050
```sh
3151
# systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
3252
OS Name: Microsoft Windows 11 Pro
3353
OS Version: 10.0.22621 N/A Build 22621
3454
```
3555

56+
### Rust Compiler Version
57+
3658
```sh
3759
# rustc -vV
3860
rustc 1.78.0-nightly (1a648b397 2024-02-11)

0 commit comments

Comments
 (0)