<commit_before># CBT Java Test Proxy

The CBT test proxy is intended for running confromance tests for Cloug Bigtable Java Client.

## Set up 

If you have not already done so, [install golang](https://go.dev/doc/install), then clone the go test library:

```
git clone https://github.com/googleapis/cloud-bigtable-clients-test.git
```

## Start test proxy

Build the proxy with the latest version of the client

```
cd java-bigtable/test-proxy
mvn clean install
```

Start the proxy on default port 9999

```
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain
```

Start the proxy on a different port

```
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain -Dport=1
```

Build and start the proxy with an older version of the client

```
mvn clean install -Dbigtable.client.version=<client_version> -Denforcer.skip
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain<commit_msg>chore: update readme to build the root directory first (#1526)<commit_after># CBT Java Test Proxy

The CBT test proxy is intended for running confromance tests for Cloug Bigtable Java Client.

## Set up 

If you have not already done so, [install golang](https://go.dev/doc/install), then clone the go test library:

```
git clone https://github.com/googleapis/cloud-bigtable-clients-test.git
```

## Start test proxy

Build the proxy with the latest version of the client

```
cd java-bigtable
mvn clean install -DskipTests
cd test-proxy
mvn clean install
```

Start the proxy on default port 9999

```
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain
```

Start the proxy on a different port

```
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain -Dport=1
```

Build and start the proxy with an older version of the client

```
mvn clean install -Dbigtable.client.version=<client_version> -Denforcer.skip
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain
{'fraction_non_alphanumeric': 0.09921414538310412, 'fraction_numerical': 0.0068762278978389, 'mean_word_length': 4.786931818181818, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '879318', 'n_tokens_mistral': 671, 'n_tokens_neox': 636, 'n_words': 212}