You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2016/09/16 05:49:34 UTC
[20/50] [abbrv] ignite git commit: Added sequence benchmark.
Added sequence benchmark.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d155af31
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d155af31
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d155af31
Branch: refs/heads/ignite-3443
Commit: d155af31bf9c53040b677bdf77939fee7c8c1c61
Parents: 2ba74af
Author: sboikov <sb...@gridgain.com>
Authored: Tue Sep 13 17:48:42 2016 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Sep 13 17:48:42 2016 +0300
----------------------------------------------------------------------
.../cache/IgniteAtomicSequenceBenchmark.java | 45 ++++++++++++++++++++
1 file changed, 45 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/d155af31/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAtomicSequenceBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAtomicSequenceBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAtomicSequenceBenchmark.java
new file mode 100644
index 0000000..4b2f085
--- /dev/null
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteAtomicSequenceBenchmark.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.ignite.yardstick.cache;
+
+import java.util.Map;
+import org.apache.ignite.IgniteAtomicSequence;
+import org.apache.ignite.yardstick.IgniteAbstractBenchmark;
+import org.yardstickframework.BenchmarkConfiguration;
+
+/**
+ * Ignite atomic sequence benchmark.
+ */
+public class IgniteAtomicSequenceBenchmark extends IgniteAbstractBenchmark {
+ /** Cache. */
+ private IgniteAtomicSequence seq;
+
+ /** {@inheritDoc} */
+ @Override public void setUp(BenchmarkConfiguration cfg) throws Exception {
+ super.setUp(cfg);
+
+ seq = ignite().atomicSequence("benchSequence", 0, true);
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean test(Map<Object, Object> ctx) throws Exception {
+ seq.incrementAndGet();
+
+ return true;
+ }
+}