Skip to content

Commit 18d19c2

Browse files
committed
Updated README
1 parent 48f7960 commit 18d19c2

File tree

1 file changed

+89
-3
lines changed

1 file changed

+89
-3
lines changed

README.md

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,90 @@
1-
wargame
2-
=======
1+
WarGame Java
2+
============
33

4-
A kinda-sorta benchmarking program in Java.
4+
This is an updated version of the longstanding WarGame project from [@ryanmr](http://twitter/ryanmr), the kinda-sorta benchmark.
5+
6+
**Disclaimer:** WarGame Java is a tiny kinda-sorta benchmark, and as such, it should not be taken too seriously.
7+
8+
Changelog
9+
---------
10+
11+
Unfortunately, time has erased the progress of this project. Hopefully this brief explanation can fill in that gap.
12+
13+
It is worth noting that the original implementation of the WarGame was written in Java, while [@ryanmr](http://twitter.com/ryanmr) was a sophomore in high school, and every so often, he would revisit the project and expand on the progress.
14+
15+
In a sense this is the 4th major version:
16+
17+
1. Initial version written sometime in an air conditioned basement in 2009, designed to simply iterate to 1 million games.
18+
2. The *variation* approach was implemented, where the game would continue for *speed seconds* until the speed did not change within 4 decimal places
19+
3. A minor update to the second version, where the Java was Java-ized to be *pragmatic Java*, by which I mean, disgusting.
20+
4. A major update to mirror support the Rust and Go versions, now implementing the standardized prime and sample time approaches.
21+
22+
Legend
23+
------
24+
25+
You definitely should read the [legend](https://github.com/WarGameBenchmarks/wargame/blob/master/legend.md) to learn about the output.
26+
27+
How To Run
28+
----------
29+
30+
With the executable *JAR* directly:
31+
32+
```
33+
java -jar wargame-java.jar [number of threads] [multiplier]
34+
```
35+
36+
If the `number of threads` are not specified, the default is 1 thread. Specify the `multiplier` for additional run time according to the [legend](https://github.com/WarGameBenchmarks/wargame/blob/master/legend.md).
37+
38+
How To Compile
39+
--------------
40+
41+
To compile:
42+
43+
```
44+
./compile.sh
45+
```
46+
47+
To run likewise:
48+
49+
```
50+
./run.sh [number of threads] [multiplier]
51+
```
52+
53+
To bundle the class files into a jar, use the provided `bundle.sh` file:
54+
55+
```
56+
./bundle.sh
57+
```
58+
59+
Sample Output
60+
------
61+
62+
```
63+
➜ wargame-java ✗ java -jar wargame-java.jar
64+
WarGame Java
65+
settings: threads = 1; multiplier = 1.00
66+
67+
4. done
68+
---
69+
Samples: 9981
70+
Mean: 20.26894
71+
Median: 20.46168
72+
S.D.: 0.41262
73+
C.O.V.: 0.02036
74+
---
75+
Min-Max: < 18.96038 - 20.66101 > Δ 1.70063
76+
1-σ: < 19.85633 - 20.68156 > Δ 0.82523
77+
μ-Median: < 20.26894 - 20.46168 > Δ 0.19273
78+
99.9% CI: < 20.25535 - 20.28254 > Δ 0.02718
79+
---
80+
Threads: 1
81+
Multiplier: 1.00
82+
Speed: 20.49160 g/ms
83+
Games: 1229615
84+
Duration: 60.0s
85+
---
86+
Rank: (3/5) B
87+
Rank Criteria: 1 | 2 | 4
88+
---
89+
Score: 20
90+
```

0 commit comments

Comments
 (0)