You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2019/12/02 19:03:13 UTC
[incubator-datasketches-characterization] branch
union_update_timing created (now dffb235)
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a change to branch union_update_timing
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git.
at dffb235 CPC union update speed
This branch includes the following new commits:
new f9dc8a9 fixed typos
new 32ab994 HLL union update speed
new 9ba6af5 Theta union update speed
new dffb235 CPC union update speed
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
[incubator-datasketches-characterization] 02/04: HLL union update
speed
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch union_update_timing
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git
commit 32ab9948f5ed28d238241915d235a8d95a52f4dc
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Mon Dec 2 11:01:37 2019 -0800
HLL union update speed
---
.../hll/HllUnionUpdateSpeedProfile.java | 65 ++++++++++++++++++++++
src/main/resources/hll/HllUnionUpdateSpeedJob.conf | 42 ++++++++++++++
2 files changed, 107 insertions(+)
diff --git a/src/main/java/org/apache/datasketches/characterization/hll/HllUnionUpdateSpeedProfile.java b/src/main/java/org/apache/datasketches/characterization/hll/HllUnionUpdateSpeedProfile.java
new file mode 100644
index 0000000..52d99f4
--- /dev/null
+++ b/src/main/java/org/apache/datasketches/characterization/hll/HllUnionUpdateSpeedProfile.java
@@ -0,0 +1,65 @@
+/*
+ * 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.datasketches.characterization.hll;
+
+import org.apache.datasketches.characterization.uniquecount.BaseUpdateSpeedProfile;
+import org.apache.datasketches.hll.HllSketch;
+import org.apache.datasketches.hll.Union;
+
+import java.lang.reflect.Array;
+
+public class HllUnionUpdateSpeedProfile extends BaseUpdateSpeedProfile {
+ private int lgK;
+ private int numSketches;
+ private HllSketch[] sketches;
+
+ @Override
+ public void configure() {
+ lgK = Integer.parseInt(prop.mustGet("LgK"));
+ numSketches = Integer.parseInt(prop.mustGet("NumSketches"));
+ sketches = (HllSketch[]) Array.newInstance(HllSketch.class, numSketches);
+ }
+
+ @Override
+ public double doTrial(final int uPerTrial) {
+ for (int i = 0; i < numSketches; i++) {
+ sketches[i] = new HllSketch(lgK);
+ }
+
+ { // spray values across all sketches
+ int i = 0;
+ for (int u = uPerTrial; u-- > 0;) {
+ sketches[i++].update(++vIn);
+ if (i == numSketches) i = 0;
+ }
+ }
+
+ final Union union = new Union(lgK);
+ final long startUpdateTime_nS = System.nanoTime();
+
+ for (int i = numSketches; i-- > 0;) {
+ union.update(sketches[i]);
+ }
+
+ final long updateTime_nS = System.nanoTime() - startUpdateTime_nS;
+ return updateTime_nS;
+ }
+
+}
diff --git a/src/main/resources/hll/HllUnionUpdateSpeedJob.conf b/src/main/resources/hll/HllUnionUpdateSpeedJob.conf
new file mode 100644
index 0000000..cd6abf4
--- /dev/null
+++ b/src/main/resources/hll/HllUnionUpdateSpeedJob.conf
@@ -0,0 +1,42 @@
+# 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.
+
+# Job
+
+#Uniques Profile
+Trials_lgMinU=0 #The starting # of uniques that is printed at the end.
+Trials_lgMaxU=26 #How high the # uniques go
+Trials_UPPO=16 #The horizontal x-resolution of trials points
+
+# Trials Profile
+Trials_lgMaxT=18 #Max trials at start (low counts)
+Trials_lgMinT=8 #Min trials at tail (high counts)
+
+#Trails Speed related
+Trials_lgMinBpU=0 #start the downward slope of trials at this LgU
+Trials_lgMaxBpU=26 #stop the downward slope of trials at this LgU
+
+# Date-Time Profile
+TimeZone=PST
+TimeZoneOffset=-28800000 # offset in millisec
+FileNameDateFormat=yyyyMMdd'_'HHmmssz
+ReadableDateFormat=yyyy/MM/dd HH:mm:ss z
+
+#Job Profile
+JobProfile=org.apache.datasketches.characterization.hll.HllUnionUpdateSpeedProfile
+LgK=12
+NumSketches=32
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
[incubator-datasketches-characterization] 01/04: fixed typos
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch union_update_timing
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git
commit f9dc8a9d3fc0244f6ea9323c905cdeadb3b1aba4
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Mon Dec 2 11:00:33 2019 -0800
fixed typos
---
src/main/java/org/apache/datasketches/PowerLawGenerator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/datasketches/PowerLawGenerator.java b/src/main/java/org/apache/datasketches/PowerLawGenerator.java
index 8035c2c..d67a876 100644
--- a/src/main/java/org/apache/datasketches/PowerLawGenerator.java
+++ b/src/main/java/org/apache/datasketches/PowerLawGenerator.java
@@ -25,13 +25,13 @@ import static java.lang.Math.log;
/**
* A simple tool to generate (x,y) pairs of points that follow a power-law
* relationship. This class provides both a convenient dynamic class with
- * simplified get methods or the equalivant static calls with full arguments.
+ * simplified get methods or the equivalent static calls with full arguments.
* The basic static methods can also be used to generate equally spaced points
* for a single axis.
*
* <p>
* The equal spacing is created using "generating indices" that are first
- * obtained from these methods and then used to generate the x-coordiantes or
+ * obtained from these methods and then used to generate the x-coordinates or
* full (x,y) Pairs. Please refer to example code in the associated test class.
* </p>
*
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
[incubator-datasketches-characterization] 03/04: Theta union update
speed
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch union_update_timing
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git
commit 9ba6af5762f9e880e2bb1e149820331e5921984b
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Mon Dec 2 11:02:16 2019 -0800
Theta union update speed
---
.../theta/ThetaUnionUpdateSpeedProfile.java | 81 ++++++++++++++++++++++
.../resources/theta/ThetaUnionUpdateSpeedJob.conf | 42 +++++++++++
2 files changed, 123 insertions(+)
diff --git a/src/main/java/org/apache/datasketches/characterization/theta/ThetaUnionUpdateSpeedProfile.java b/src/main/java/org/apache/datasketches/characterization/theta/ThetaUnionUpdateSpeedProfile.java
new file mode 100644
index 0000000..3152780
--- /dev/null
+++ b/src/main/java/org/apache/datasketches/characterization/theta/ThetaUnionUpdateSpeedProfile.java
@@ -0,0 +1,81 @@
+/*
+ * 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.datasketches.characterization.theta;
+
+import org.apache.datasketches.characterization.uniquecount.BaseUpdateSpeedProfile;
+import org.apache.datasketches.theta.Sketches;
+import org.apache.datasketches.theta.UpdateSketch;
+import org.apache.datasketches.theta.UpdateSketchBuilder;
+import org.apache.datasketches.theta.CompactSketch;
+import org.apache.datasketches.theta.SetOperationBuilder;
+import org.apache.datasketches.theta.Union;
+
+import java.lang.reflect.Array;
+
+public class ThetaUnionUpdateSpeedProfile extends BaseUpdateSpeedProfile {
+ private int lgK;
+ private int numSketches;
+ private UpdateSketch[] updateSketches;
+ private CompactSketch[] compactSketches;
+ private UpdateSketchBuilder sketchBuilder;
+ private SetOperationBuilder setOpBuilder;
+
+ @Override
+ public void configure() {
+ lgK = Integer.parseInt(prop.mustGet("LgK"));
+ numSketches = Integer.parseInt(prop.mustGet("NumSketches"));
+ updateSketches = (UpdateSketch[]) Array.newInstance(UpdateSketch.class, numSketches);
+ compactSketches = (CompactSketch[]) Array.newInstance(CompactSketch.class, numSketches);
+ sketchBuilder = Sketches.updateSketchBuilder().setNominalEntries(1 << lgK);
+ setOpBuilder = Sketches.setOperationBuilder().setNominalEntries(1 << lgK);
+ }
+
+ @Override
+ public double doTrial(final int uPerTrial) {
+ for (int i = 0; i < numSketches; i++) {
+ updateSketches[i] = sketchBuilder.build();
+ }
+
+ { // spray values across all sketches
+ int i = 0;
+ for (int u = uPerTrial; u-- > 0;) {
+ updateSketches[i++].update(++vIn);
+ if (i == numSketches) i = 0;
+ }
+ }
+
+ { // trim and compact sketches
+ for (int i = 0; i < numSketches; i++) {
+ compactSketches[i] = updateSketches[i].rebuild().compact();
+ }
+ }
+
+ final Union union = setOpBuilder.buildUnion();
+ final long startUpdateTime_nS = System.nanoTime();
+
+ for (int i = numSketches; i-- > 0;) {
+ union.update(compactSketches[i]);
+ }
+
+ final long updateTime_nS = System.nanoTime() - startUpdateTime_nS;
+ return updateTime_nS;
+ }
+
+}
diff --git a/src/main/resources/theta/ThetaUnionUpdateSpeedJob.conf b/src/main/resources/theta/ThetaUnionUpdateSpeedJob.conf
new file mode 100644
index 0000000..de06edc
--- /dev/null
+++ b/src/main/resources/theta/ThetaUnionUpdateSpeedJob.conf
@@ -0,0 +1,42 @@
+# 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.
+
+# Job
+
+#Uniques Profile
+Trials_lgMinU=0 #The starting # of uniques that is printed at the end.
+Trials_lgMaxU=26 #How high the # uniques go
+Trials_UPPO=16 #The horizontal x-resolution of trials points
+
+# Trials Profile
+Trials_lgMaxT=14 #Max trials at start (low counts)
+Trials_lgMinT=6 #Min trials at tail (high counts)
+
+#Trails Speed related
+Trials_lgMinBpU=0 #start the downward slope of trials at this LgU
+Trials_lgMaxBpU=26 #stop the downward slope of trials at this LgU
+
+# Date-Time Profile
+TimeZone=PST
+TimeZoneOffset=-28800000 # offset in millisec
+FileNameDateFormat=yyyyMMdd'_'HHmmssz
+ReadableDateFormat=yyyy/MM/dd HH:mm:ss z
+
+#Job Profile
+JobProfile=org.apache.datasketches.characterization.theta.ThetaUnionUpdateSpeedProfile
+LgK=12
+NumSketches=32
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org
[incubator-datasketches-characterization] 04/04: CPC union update
speed
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch union_update_timing
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git
commit dffb235884e04f234d1500e79585a0047db7c295
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Mon Dec 2 11:02:39 2019 -0800
CPC union update speed
---
.../cpc/CpcUnionUpdateSpeedProfile.java | 65 ++++++++++++++++++++++
src/main/resources/cpc/CpcUnionUpdateSpeedJob.conf | 42 ++++++++++++++
2 files changed, 107 insertions(+)
diff --git a/src/main/java/org/apache/datasketches/characterization/cpc/CpcUnionUpdateSpeedProfile.java b/src/main/java/org/apache/datasketches/characterization/cpc/CpcUnionUpdateSpeedProfile.java
new file mode 100644
index 0000000..bc29942
--- /dev/null
+++ b/src/main/java/org/apache/datasketches/characterization/cpc/CpcUnionUpdateSpeedProfile.java
@@ -0,0 +1,65 @@
+/*
+ * 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.datasketches.characterization.cpc;
+
+import org.apache.datasketches.characterization.uniquecount.BaseUpdateSpeedProfile;
+import org.apache.datasketches.cpc.CpcSketch;
+import org.apache.datasketches.cpc.CpcUnion;
+
+import java.lang.reflect.Array;
+
+public class CpcUnionUpdateSpeedProfile extends BaseUpdateSpeedProfile {
+ private int lgK;
+ private int numSketches;
+ private CpcSketch[] sketches;
+
+ @Override
+ public void configure() {
+ lgK = Integer.parseInt(prop.mustGet("LgK"));
+ numSketches = Integer.parseInt(prop.mustGet("NumSketches"));
+ sketches = (CpcSketch[]) Array.newInstance(CpcSketch.class, numSketches);
+ }
+
+ @Override
+ public double doTrial(final int uPerTrial) {
+ for (int i = 0; i < numSketches; i++) {
+ sketches[i] = new CpcSketch(lgK);
+ }
+
+ { // spray values across all sketches
+ int i = 0;
+ for (int u = uPerTrial; u-- > 0;) {
+ sketches[i++].update(++vIn);
+ if (i == numSketches) i = 0;
+ }
+ }
+
+ final CpcUnion union = new CpcUnion(lgK);
+ final long startUpdateTime_nS = System.nanoTime();
+
+ for (int i = numSketches; i-- > 0;) {
+ union.update(sketches[i]);
+ }
+
+ final long updateTime_nS = System.nanoTime() - startUpdateTime_nS;
+ return updateTime_nS;
+ }
+
+}
diff --git a/src/main/resources/cpc/CpcUnionUpdateSpeedJob.conf b/src/main/resources/cpc/CpcUnionUpdateSpeedJob.conf
new file mode 100644
index 0000000..3b36faa
--- /dev/null
+++ b/src/main/resources/cpc/CpcUnionUpdateSpeedJob.conf
@@ -0,0 +1,42 @@
+# 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.
+
+# Job
+
+#Uniques Profile
+Trials_lgMinU=0 #The starting # of uniques that is printed at the end.
+Trials_lgMaxU=26 #How high the # uniques go
+Trials_UPPO=16 #The horizontal x-resolution of trials points
+
+# Trials Profile
+Trials_lgMaxT=16 #Max trials at start (low counts)
+Trials_lgMinT=8 #Min trials at tail (high counts)
+
+#Trails Speed related
+Trials_lgMinBpU=0 #start the downward slope of trials at this LgU
+Trials_lgMaxBpU=26 #stop the downward slope of trials at this LgU
+
+# Date-Time Profile
+TimeZone=PST
+TimeZoneOffset=-28800000 # offset in millisec
+FileNameDateFormat=yyyyMMdd'_'HHmmssz
+ReadableDateFormat=yyyy/MM/dd HH:mm:ss z
+
+#Job Profile
+JobProfile=org.apache.datasketches.characterization.cpc.CpcUnionUpdateSpeedProfile
+LgK=12
+NumSketches=32
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org