-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
175 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
== Data | ||
|
||
This product uses Google Analytics, a web analytics service provided by Google, Inc.("Google"). | ||
|
||
This product sends usage data and platform information via a secure connection to Google Analytics. | ||
|
||
This product stores a small file with a random client id (UUID) in the user's home directory. Because it is random, it does not contain any personal information. | ||
|
||
== Conveyed Properties | ||
Properties are conveyed over a secure (https) connection and includes the following: | ||
|
||
* Event name (e.g. "started") | ||
* Version of the library (e.g. "5.20.146") | ||
* The three top-most external package names (e.g. "org.apache.commons") | ||
* A random client id (UUID) (e.g. "c38175c7-e822-40ef-a2ff-73a2e888b47c") | ||
* The following System Properties: | ||
- java.runtime.name (e.g "Java(TM) SE Runtime Environment") | ||
- java.runtime.version (e.g. "1.8.0_191-b12") | ||
- os.name (e.g. "Mac OS X") | ||
- os.arch (e.g. "x86_64") | ||
- os.version (e.g. "10.16") | ||
- timezone.default (e.g. "Europe/London") | ||
- available.processors (e.g. "16") | ||
- max.memory.gib (e.g "14") | ||
- java.major.version (e.g. "8") | ||
- max.direct.memory.gib (e.g. "14") | ||
|
||
The following library-specific properties are also conveyed: | ||
|
||
* Key type (e.g. `java.lang.Long`) | ||
* Value type (e.g. `java.lang.CharSequence`) | ||
* Entries (e.g. 10000) | ||
|
||
== Why is Data Collected? | ||
Knowing how our products are used allows us to focus our resources more efficiently in our effort to improve our libraries and | ||
provide better and more widely adopted solutions for the community. | ||
|
||
== Open Data Pledge | ||
Chronicle pledges to make aggregated data reports (using collected data) available to the general public at no cost. | ||
Contact info@chronicle.software to obtain a link to these reports. | ||
|
||
== Consent | ||
By using this product, you consent to the collection, storage and processing of data (sent by this library) by Google and Chronicle in the manner and for the purposes set out above. | ||
|
||
If you do not consent you can do either of the following: | ||
|
||
A) Refrain from using this product | ||
|
||
OR | ||
|
||
B) Contact info@chronicle.software to have this feature removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/net/openhft/chronicle/internal/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* This package and any and all sub-packages contains strictly internal classes for this Chronicle library. | ||
* Internal classes shall <em>never</em> be used directly. | ||
* <p> | ||
* Specifically, the following actions (including, but not limited to) are not allowed | ||
* on internal classes and packages: | ||
* <ul> | ||
* <li>Casting to</li> | ||
* <li>Reflection of any kind</li> | ||
* <li>Explicit Serialize/deserialize</li> | ||
* </ul> | ||
* <p> | ||
* The classes in this package and any sub-package are subject to | ||
* changes at any time for any reason. | ||
*/ | ||
package net.openhft.chronicle.internal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/net/openhft/chronicle/map/internal/AnalyticsHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package net.openhft.chronicle.map.internal; | ||
|
||
import net.openhft.chronicle.core.analytics.AnalyticsFacade; | ||
import net.openhft.chronicle.core.pom.PomProperties; | ||
|
||
public enum AnalyticsHolder {; | ||
|
||
static { | ||
System.setProperty("chronicle.analytics.enable","true"); | ||
} | ||
|
||
// Todo: VERSION is "unknown" for some reason | ||
private static final String VERSION = PomProperties.version("net.openhft", "chronicle-map"); | ||
|
||
private static final AnalyticsFacade ANALYTICS = AnalyticsFacade.standardBuilder("G-TDTJG5CT6G", "J8qsWGHgQP6CLs43mQ10KQ", VERSION) | ||
//.withReportDespiteJUnit() | ||
.withDebugLogger(System.out::println) | ||
//.withUrl("https://www.google-analytics.com/debug/mp/collect") | ||
.build(); | ||
|
||
public static AnalyticsFacade instance() { | ||
return ANALYTICS; | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
src/main/java/net/openhft/chronicle/map/internal/AnalyticsMain.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package net.openhft.chronicle.map.internal; | ||
|
||
import net.openhft.chronicle.core.Jvm; | ||
import net.openhft.chronicle.map.ChronicleMap; | ||
import net.openhft.chronicle.map.ChronicleMapBuilder; | ||
|
||
public final class AnalyticsMain { | ||
|
||
public static final String BASE_MAP_NAME = "analytics_test_map"; | ||
public static final String MAP_NAME1 = BASE_MAP_NAME + "1"; | ||
public static final String MAP_NAME2 = BASE_MAP_NAME + "2"; | ||
|
||
public static void main(String[] args) { | ||
System.out.println("Creating two maps and sending analytics..."); | ||
System.out.println("Currently, there is a limit of four messages per h per JVM instance so only some analytics messages might be sent upstream."); | ||
|
||
try (ChronicleMap<CharSequence, CharSequence> m1 = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class) | ||
.name(MAP_NAME1) | ||
.averageKeySize(32) | ||
.averageValueSize(32) | ||
.entries(1_000) | ||
.create()) { | ||
try (ChronicleMap<Long, CharSequence> m2 = ChronicleMapBuilder.of(Long.class, CharSequence.class) | ||
.name(MAP_NAME2) | ||
.averageValueSize(32) | ||
.entries(100) | ||
.create()) { | ||
|
||
m1.put("A", "1"); | ||
m2.put(2L, "Two"); | ||
} | ||
} | ||
Jvm.pause(2_000); | ||
System.out.println("Completed successfully"); | ||
System.exit(0); | ||
} | ||
|
||
private static <K, V> ChronicleMap<K, V> createMap(Class<K> keyType, Class<V> valueType, String name) { | ||
return ChronicleMapBuilder.of(keyType, valueType) | ||
.name(name) | ||
.averageKeySize(32) | ||
.averageValueSize(32) | ||
.entries(1_000) | ||
.create(); | ||
} | ||
|
||
} |