Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eqx dump cosmos #177

Merged
merged 12 commits into from
Nov 8, 2019
Prev Previous commit
Next Next commit
Add README example usage
  • Loading branch information
bartelink committed Nov 8, 2019
commit 966e62c48cac23c4ecfa6a67779a12a1eb218986
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ While Equinox is implemented in F#, and F# is a great fit for writing event-sour

7. Use `propulsion` tool to Run a CosmosDb ChangeFeedProcessor, emitting to a Kafka topic

```powershell
```powershell
$env:PROPULSION_KAFKA_BROKER="instance.kafka.mysite.com:9092" # or use -b
# `-v` for verbose logging
# `-v` for verbose logging
# `projector3` represents the consumer group; >=1 are allowed, allowing multiple independent projections to run concurrently
# `-l 5` to report ChangeFeed lags every 5 minutes
# `kafka` specifies one wants to emit to Kafka
Expand Down Expand Up @@ -321,23 +321,24 @@ While Equinox is implemented in F#, and F# is a great fit for writing event-sour
cd ~/code/equinox

# set up the DB/schema
& dotnet run -f netcoreapp2.1 -p tools/Equinox.Tool -- config pg -c "connectionstring" -p "u=un;p=password" -s "schema"
dotnet run -f netcoreapp2.1 -p tools/Equinox.Tool -- config pg -c "connectionstring" -p "u=un;p=password" -s "schema"

# run a benchmark
& dotnet run -c Release -f netcoreapp2.1 -p tools/Equinox.Tool -- run -t saveforlater -f 50 -d 5 -C -U pg -c "connectionstring" -p "u=un;p=password" -s "schema"
dotnet run -c Release -f netcoreapp2.1 -p tools/Equinox.Tool -- run -t saveforlater -f 50 -d 5 -C -U pg -c "connectionstring" -p "u=un;p=password" -s "schema"

# run the webserver, -A to autocreate schema on connection
& dotnet run -p samples/Web/ -- my -c "mysqlconnectionstring" -A
dotnet run -p samples/Web/ -- my -c "mysqlconnectionstring" -A

#############################
# TODO - NOTE NOT YET RELEASED
##############################

# set up the DB/schema
& eqx config pg -c "connectionstring" -p "u=un;p=password" -s "schema"
eqx config pg -c "connectionstring" -p "u=un;p=password" -s "schema"

# run a benchmark
& eqx run -t saveforlater -f 50 -d 5 -C -U pg -c "connectionstring" -p "u=un;p=password" -s "schema"
eqx run -t saveforlater -f 50 -d 5 -C -U pg -c "connectionstring" -p "u=un;p=password" -s "schema"
eqx dump -J -S "SavedForLater-ab25cc9f24464d39939000aeb37ea11a" pg # show stored JSON (Guid shown in eqx run output)
```

### BENCHMARKS
Expand Down
3 changes: 2 additions & 1 deletion tools/Equinox.Tool/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ module LoadTest =
| None, None -> invalidOp "impossible None, None"
let clients = Array.init (a.TestsPerSecond * 2) (fun _ -> % Guid.NewGuid())

log.ForContext("clientIds",if verboseConsole then Seq.ofArray clients else Seq.truncate 5 clients)
let renderedIds = clients |> Seq.map ClientId.toStringN |> if verboseConsole then id else Seq.truncate 5
log.ForContext((if verboseConsole then "clientIds" else "clientIdsExcerpt"),renderedIds)
.Information("Running {test} for {duration} @ {tps} hits/s across {clients} clients; Max errors: {errorCutOff}, reporting intervals: {ri}, report file: {report}",
test, a.Duration, a.TestsPerSecond, clients.Length, a.ErrorCutoff, a.ReportingIntervals, reportFilename)
// Reset the start time based on which the shared global metrics will be computed
Expand Down