From 25823de4f6dfc0cbe491a3c70360b53edb92fd6b Mon Sep 17 00:00:00 2001 From: jzonthemtn Date: Sat, 16 Nov 2024 09:08:48 -0500 Subject: [PATCH] #141 Updating the readme. --- phileas-benchmark/README.md | 30 +++++-------------- .../philterd/phileas/benchmarks/Result.java | 1 + 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/phileas-benchmark/README.md b/phileas-benchmark/README.md index b86985f9..bdc95ec5 100644 --- a/phileas-benchmark/README.md +++ b/phileas-benchmark/README.md @@ -1,23 +1,16 @@ -# phileas-benchmark -Benchmark tests for Phileas PII engine - -This command-line utility runs a series of single-threaded workloads using [Phileas](https://github.com/philterd/phileas) -to redact PII tokens in strings of varying sizes. Workloads can be run multiple times to warm up the JVM or test long-term use. -Workloads run for a fixed amount of time rather than a fixed number of iterations. - -[![CodeFactor](https://www.codefactor.io/repository/github/philterd/phileas-benchmark/badge)](https://www.codefactor.io/repository/github/resurfaceio/phileas-benchmark) +# Phileas Benchmarks -## Dependencies +Benchmark tests for Phileas PII engine -* Java 21 -* Maven 3.9.x -* [philterd/phileas](https://github.com/philterd/phileas) +These tests run a series of single-threaded workloads using to redact PII tokens in strings of varying sizes. Workloads can be run multiple times to warm up the JVM or to test long-term use. Workloads run for a fixed amount of time rather than a fixed number of iterations. -## Running Locally +## To Run ``` -mvn clean package +BENCHMARKS_ENABLED=true mvn test +``` +``` # run workloads across all documents java -server -Xmx512M -XX:+AlwaysPreTouch -XX:PerBytecodeRecompilationCutoff=10000 -XX:PerMethodRecompilationCutoff=10000 -jar target/phileas-benchmark-cmd.jar all mask_all 1 15000 @@ -25,12 +18,6 @@ java -server -Xmx512M -XX:+AlwaysPreTouch -XX:PerBytecodeRecompilationCutoff=100 java -server -Xmx512M -XX:+AlwaysPreTouch -XX:PerBytecodeRecompilationCutoff=10000 -XX:PerMethodRecompilationCutoff=10000 -jar target/phileas-benchmark-cmd.jar gettysberg_address mask_credit_cards 1 1000 ``` -To get the results back as a JSON object, append a `json` argument to the command: - -``` -java -server -Xmx512M -XX:+AlwaysPreTouch -XX:PerBytecodeRecompilationCutoff=10000 -XX:PerMethodRecompilationCutoff=10000 -jar target/phileas-benchmark-cmd.jar all mask_all 1 15000 json -``` - ### Available documents * hello_world (11 chars) @@ -57,6 +44,3 @@ For testing multiple identifiers: * mask_all (the identifiers listed above 👆) * mask_fastest (bank routing numbers, bitcoin addresses, credit cards, email addresses, IBAN codes, phone numbers, ssns) * mask_none - ---- -Copyright 2024 Philterd, LLC @ https://www.philterd.ai diff --git a/phileas-benchmark/src/test/java/ai/philterd/phileas/benchmarks/Result.java b/phileas-benchmark/src/test/java/ai/philterd/phileas/benchmarks/Result.java index 74f1c28f..a628ac96 100644 --- a/phileas-benchmark/src/test/java/ai/philterd/phileas/benchmarks/Result.java +++ b/phileas-benchmark/src/test/java/ai/philterd/phileas/benchmarks/Result.java @@ -125,4 +125,5 @@ public String getBranch() { public void setBranch(String branch) { this.branch = branch; } + }