You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2017/02/17 09:59:20 UTC
[10/50] [abbrv] ignite git commit: Added cache.getAll benchmarks for
offheap cache.
Added cache.getAll benchmarks for offheap cache.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/074a4a08
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/074a4a08
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/074a4a08
Branch: refs/heads/ignite-1.9
Commit: 074a4a08012822f3404807015bc63052c20e7439
Parents: 660cd1e
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jan 11 17:54:55 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jan 11 17:54:55 2017 +0300
----------------------------------------------------------------------
.../ignite/yardstick/cache/IgniteGetBenchmark.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/074a4a08/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
index 918f571..9dd5058 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetBenchmark.java
@@ -29,9 +29,6 @@ import static org.yardstickframework.BenchmarkUtils.println;
* Ignite benchmark that performs get operations.
*/
public class IgniteGetBenchmark extends IgniteCacheAbstractBenchmark<Integer, Object> {
- /** */
- private static final String CACHE_NAME = "atomic";
-
/** {@inheritDoc} */
@Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
super.setUp(cfg);
@@ -40,11 +37,13 @@ public class IgniteGetBenchmark extends IgniteCacheAbstractBenchmark<Integer, Ob
throw new IllegalArgumentException("Preloading amount (\"-pa\", \"--preloadAmount\") " +
"must by less then the range (\"-r\", \"--range\").");
- println(cfg, "Loading data...");
+ String cacheName = cache().getName();
+
+ println(cfg, "Loading data for cache: " + cacheName);
long start = System.nanoTime();
- try (IgniteDataStreamer<Object, Object> dataLdr = ignite().dataStreamer(CACHE_NAME)) {
+ try (IgniteDataStreamer<Object, Object> dataLdr = ignite().dataStreamer(cacheName)) {
for (int i = 0; i < args.preloadAmount(); i++) {
dataLdr.addData(i, new SampleValue(i));
@@ -71,6 +70,6 @@ public class IgniteGetBenchmark extends IgniteCacheAbstractBenchmark<Integer, Ob
/** {@inheritDoc} */
@Override protected IgniteCache<Integer, Object> cache() {
- return ignite().cache(CACHE_NAME);
+ return ignite().cache("atomic");
}
}