aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-12-03 13:12:22 +0100
committervanhauser-thc <vh@thc.org>2023-12-03 13:12:22 +0100
commit01e0d4aa1c9e856124491d1f23deea0ae443d8ea (patch)
tree5a18813dd836aee2aae0a7b1941c710a983520cf
parent477a5176281a907c9c54d4588c88ea1ed93e72e2 (diff)
downloadafl++-01e0d4aa1c9e856124491d1f23deea0ae443d8ea.tar.gz
comparison -> comparison.md
-rw-r--r--benchmark/COMPARISON9
-rw-r--r--benchmark/README.md6
-rwxr-xr-xbenchmark/benchmark.py8
3 files changed, 7 insertions, 16 deletions
diff --git a/benchmark/COMPARISON b/benchmark/COMPARISON
deleted file mode 100644
index f3ac3687..00000000
--- a/benchmark/COMPARISON
+++ /dev/null
@@ -1,9 +0,0 @@
-CPU | MHz | threads | singlecore | multicore | afl-*-config |
-====================================================|=======|=========|============|===========|==============|
-Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz | 4995 | 16 | 120064 | 1168943 | both |
-Apple Mac Studio M2 Ultra 2023, Linux VM guest | 3500 | 16 | 163570 | 1157465 | both |
-AMD EPYC 7282 16-Core Processor | 3194 | 32 | 87199 | 769001 | both |
-AMD Ryzen 5 PRO 4650G with Radeon Graphics | 3700 | 12 | 95356 | 704840 | both |
-12th Gen Intel(R) Core(TM) i7-1270P | 4761 | 16 | 149778 | 641219 | both |
-Raspberry Pi 5 | 2400 | 4 | 774460 | 3036637 | both
-AMD Ryzen 9 5950X 16-Core Processor | 4792 | 32 | 161690 | 2339763 | both |
diff --git a/benchmark/README.md b/benchmark/README.md
index c7d75e42..12f4763e 100644
--- a/benchmark/README.md
+++ b/benchmark/README.md
@@ -32,7 +32,7 @@ python3 benchmark.py
[*] multicore test-instr-persist-shmem run 2 of 2, execs/s: 1175584.09
[*] Average execs/sec for this test across all runs was: 1177703.38
[*] Results have been written to the benchmark-results.jsonl file.
- [*] Results have been written to the COMPARISON file.
+ [*] Results have been written to the COMPARISON.md file.
```
By default, the script will use a number of parallel fuzzers equal to your
@@ -43,8 +43,8 @@ The script will use multicore fuzzing instead of singlecore by default (change
with `--mode singlecore`) and use a persistent-mode shared memory harness for
optimal speed (change with `--target test-instr`).
-Feel free to submit the resulting line for your CPU added to the COMPARISON
-file back to aflplusplus in a pull request.
+Feel free to submit the resulting line for your CPU added to the COMPARISON.md
+and benchmark-results.jsonl files back to AFL++ in a pull request.
Each run writes results to [benchmark-results.jsonl](benchmark-results.jsonl)
in [JSON Lines](https://jsonlines.org/) format, ready to be pulled in to other
diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py
index b3d55f21..0685cedd 100755
--- a/benchmark/benchmark.py
+++ b/benchmark/benchmark.py
@@ -186,14 +186,14 @@ async def save_benchmark_results() -> None:
json.dump(asdict(results), jsonfile, sort_keys=True)
jsonfile.write("\n")
print(blue(f" [*] Results have been written to the {jsonfile.name} file."))
- with open("COMPARISON", "r+") as comparisonfile:
+ with open("COMPARISON.md", "r+") as comparisonfile:
described_config = await describe_afl_config()
aflconfig = described_config.ljust(12)
if results.hardware is None:
return
cpu_model = results.hardware.cpu_model.ljust(51)
if cpu_model in comparisonfile.read():
- print(blue(f" [*] Results have not been written to the COMPARISON file; this CPU is already present."))
+ print(blue(f" [*] Results have not been written to the COMPARISON.md file; this CPU is already present."))
return
cpu_mhz = str(round(results.hardware.cpu_fastest_core_mhz)).ljust(5)
if not "test-instr-persist-shmem" in results.targets or \
@@ -206,8 +206,8 @@ async def save_benchmark_results() -> None:
multi = str(round(results.targets["test-instr-persist-shmem"]["multicore"].execs_per_sec)).ljust(9)
cores = str(args.fuzzers).ljust(7)
comparisonfile.write(f"{cpu_model} | {cpu_mhz} | {cores} | {single} | {multi} | {aflconfig} |\n")
- print(blue(f" [*] Results have been written to the COMPARISON file."))
- with open("COMPARISON", "r") as comparisonfile:
+ print(blue(f" [*] Results have been written to the COMPARISON.md file."))
+ with open("COMPARISON.md", "r") as comparisonfile:
print(comparisonfile.read())