$ cat > hyperfoil-benchmark.yaml<<EOF
name: hotrod-benchmark
hotrod:
# Replace <USERNAME>:<PASSWORD> with your Data Grid credentials.
# Replace <SERVICE_HOSTNAME>:<PORT> with the host name and port for Data Grid.
- uri: hotrod://<USERNAME>:<PASSWORD>@<SERVICE_HOSTNAME>:<PORT>
caches:
# Replace <CACHE-NAME> with the name of your Data Grid cache.
- <CACHE-NAME>
agents:
agent-1:
agent-2:
agent-3:
agent-4:
agent-5:
phases:
- rampupPut:
increasingRate:
duration: 10s
initialUsersPerSec: 100
targetUsersPerSec: 200
maxSessions: 300
scenario: &put
- putData:
- randomInt: cacheKey <- 1 .. 40000
- randomUUID: cacheValue
- hotrodRequest:
# Replace <CACHE-NAME> with the name of your Data Grid cache.
put: <CACHE-NAME>
key: key-${cacheKey}
value: value-${cacheValue}
- rampupGet:
increasingRate:
duration: 10s
initialUsersPerSec: 100
targetUsersPerSec: 200
maxSessions: 300
scenario: &get
- getData:
- randomInt: cacheKey <- 1 .. 40000
- hotrodRequest:
# Replace <CACHE-NAME> with the name of your Data Grid cache.
get: <CACHE-NAME>
key: key-${cacheKey}
- doPut:
constantRate:
startAfter: rampupPut
duration: 5m
usersPerSec: 10000
maxSessions: 11000
scenario: *put
- doGet:
constantRate:
startAfter: rampupGet
duration: 5m
usersPerSec: 40000
maxSessions: 41000
scenario: *get
EOF
$ cat > hyperfoil-benchmark.yaml<<EOF
name: hotrod-benchmark
hotrod:# Replace <USERNAME>:<PASSWORD> with your Data Grid credentials.# Replace <SERVICE_HOSTNAME>:<PORT> with the host name and port for Data Grid.-uri: hotrod://<USERNAME>:<PASSWORD>@<SERVICE_HOSTNAME>:<PORT>caches:# Replace <CACHE-NAME> with the name of your Data Grid cache.- <CACHE-NAME>agents:agent-1:agent-2:agent-3:agent-4:agent-5:phases:-rampupPut:increasingRate:duration: 10s
initialUsersPerSec:100targetUsersPerSec:200maxSessions:300scenario:&put-putData:-randomInt: cacheKey <- 1 .. 40000
-randomUUID: cacheValue
-hotrodRequest:# Replace <CACHE-NAME> with the name of your Data Grid cache.put: <CACHE-NAME>key: key-${cacheKey}value: value-${cacheValue}-rampupGet:increasingRate:duration: 10s
initialUsersPerSec:100targetUsersPerSec:200maxSessions:300scenario:&get-getData:-randomInt: cacheKey <- 1 .. 40000
-hotrodRequest:# Replace <CACHE-NAME> with the name of your Data Grid cache.get: <CACHE-NAME>key: key-${cacheKey}-doPut:constantRate:startAfter: rampupPut
duration: 5m
usersPerSec:10000maxSessions:11000scenario:*put-doGet:constantRate:startAfter: rampupGet
duration: 5m
usersPerSec:40000maxSessions:41000scenario:*get
EOF
Copy to ClipboardCopied!Toggle word wrapToggle overflow
在任意浏览器中打开路由,以访问 Hyperfoil CLI。
上传基准测试。
运行 上传 命令。
upload
[hyperfoil]$ upload
Copy to ClipboardCopied!Toggle word wrapToggle overflow
点 Select benchmark 文件,然后导航到文件系统上的基准测试并上传该文件。
运行基准测试。
run hotrod-benchmark
[hyperfoil]$ run hotrod-benchmark
Copy to ClipboardCopied!Toggle word wrapToggle overflow
获取基准测试成绩.
stats
[hyperfoil]$ stats
Copy to ClipboardCopied!Toggle word wrapToggle overflow