dotnet / dotnet/crank

Unable to Run Crank in my local (Mac)

Open
#766 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.1k
Forks
111
Avg merge
2d 21h
Merged PRs (30d)
3

Description

Hi @sebastienros

thanks for this benchmarking tool that you built. I am trying to bench mark a .Net core Webapi Project based on the documentation i have tried to set benchmarking.yml I was stuck with this issue.

**The specified endpoint url 'http://localhost:5010' for 'application' is invalid or not responsive: "An error occurred while sending the request."**

If i try to solve this issue by making a default route for GET this is passing but it gets failed in next step. It is trying to get the JobStatus and it gets 404.

```
[01:23:59.080] Running session 'f6e9283f7aca4ef6827d3d79e53a1e59' with description ''
Unhandled exception. System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Microsoft.Crank.Controller.JobConnection.GetQueueAsync() in /_/src/Microsoft.Crank.Controller/JobConnection.cs:line 1323
at Microsoft.Crank.Controller.Program.<>c__DisplayClass61_1.<b__6>d.MoveNext() in /_/src/Microsoft.Crank.Controller/Program.cs:line 849
--- End of stack trace from previous location ---
at Microsoft.Crank.Controller.Program.Run(Configuration configuration, String[] dependencies, String session, Int32 iterations, ExcludeOptions exclude, IEnumerable`1 scripts) in /_/src/Microsoft.Crank.Controller/Program.cs:line 845
at Microsoft.Crank.Controller.Program.<>c__DisplayClass60_0.<b__1>d.MoveNext() in /_/src/Microsoft.Crank.Controller/Program.cs:line 705
--- End of stack trace from previous location ---
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.Crank.Controller.Program.Main(String[] args)`
```

**BenchMark.yml**
```
imports:
- https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Bombardier/bombardier.yml

jobs:
server:
sources:
entity:
localFolder: ./RulesPOC/RulesPOC
project: RulesPOC.csproj
readyStateText: Application started.
bombardier:
source:
repository: https://github.com/dotnet/crank.git
branchOrCommit: main
project: src/Microsoft.Crank.Jobs.Bombardier/Microsoft.Crank.Jobs.Bombardier.csproj
sourceKey: bombardier
noBuild: true
readyStateText: Bombardier Client
waitForExit: true
variables:
verb: POST
path: "https://localhost:5010/BatchPoc"
scenarios:
hello:
application:
job: server
load:
job: bombardier

profiles:
local:
variables:
serverAddress: localhost
jobs:
application:
endpoints:
- https://localhost:5010/
load:
endpoints:
- https://localhost:5010/`
```

I tried your example of the hello sample still the same.

Crank command i used - **crank --config benchmark.yml --scenario hello --profile local**

Please let me know what i am doing wrong.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.