diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-05-21 14:43:45 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-05-24 07:27:20 +0000 |
commit | 9fb8895b38fffbaa556c7aecdad57fd1230152c5 (patch) | |
tree | 4b9a04fdb092279924313c99b1f57b37dd9f5143 /it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/AclProvider.java | |
parent | 032160337ff39c42bcb536cc50cd83ebac0b6106 (diff) |
JVpp JMH benchmark
Creates ACL of size aclSize using acl_add_replace,
then assigns it to local0 using acl_interface_set_acl_list.
Then ACL is updated synchronously using acl_add_replace.
By default 20x2s warmup and 100x2s measurment iterations
are performed.
VPP is restarted after each iteration.
Each invocation of acl_add_replace uses ACL from precomputed
set of ACLs of size aclSetSize.
ACLs from the set are used in round-robin fashion.
Compile:
cd $HC2VPP_ROOT/it/jvpp-benchmark
mvn clean install
Run with:
sudo java -jar ./target/jvpp-benchmark-exec.jar
To specify aclSize (default=100), use:
sudo java -jar ./target/jvpp-benchmark-exec.jar -p aclSize=1000
To specify aclSetSize (default=100), use:
sudo java -jar ./target/jvpp-benchmark-exec.jar -p aclSetSize=1000
To see more options, use
java -jar ./target/jvpp-benchmark-exec.jar -h
Change-Id: I43691ba891940a1c341f8e9893c8598c811bc077
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/AclProvider.java')
-rw-r--r-- | it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/AclProvider.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/AclProvider.java b/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/AclProvider.java new file mode 100644 index 000000000..b00f5b90a --- /dev/null +++ b/it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/AclProvider.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.fd.hc2vpp.it.jvpp.benchmark; + +import io.fd.vpp.jvpp.acl.dto.AclAddReplace; + +/** + * Provides ACLs for JVpp Benchmark. + */ +interface AclProvider { + AclAddReplace next(); + void setAclIndex(final int index); +} |