Skip to content

Commit

Permalink
Minor JSON change for performance test
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed May 19, 2024
1 parent 3a82720 commit cc5760a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/PerformanceTest/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ router.post { request, _ in
return Response(status: .ok, body: .init(asyncSequence: request.body))
}

struct Object: ResponseEncodable {
let message: String
}

// return JSON
// ./wrk -c 128 -d 15s -t 8 http://localhost:8080/json
router.get("json") { _, _ in
return ["message": "Hello, world"]
return Object(message: "Hello, world")
}

// return JSON
Expand Down

0 comments on commit cc5760a

Please sign in to comment.