<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/kpi4j/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/kpi4j/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 19 Jan 2016 00:38:15 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/kpi4j/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Home modified by Zahid Mohammed</title><link>https://sourceforge.net/p/kpi4j/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -1,4 +1,3 @@
-
 #kpi4j
 ##What is it?

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zahid Mohammed</dc:creator><pubDate>Tue, 19 Jan 2016 00:38:15 -0000</pubDate><guid>https://sourceforge.net64eab5b0446d30256a3f336a3cff731a7af9974d</guid></item><item><title>Home modified by Zahid Mohammed</title><link>https://sourceforge.net/p/kpi4j/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -136,7 +136,7 @@

 The configuration of **Appender** tag should look like:

-    &amp;lt;Appender class="com.kpi4j.appender.JDBCAppender"&amp;gt;
+    &amp;lt;Appender class="com.kpi4j.appender.database.JDBCAppender"&amp;gt;
            &amp;lt;param name="host" value="localhost"/&amp;gt;
            &amp;lt;param name="port" value="3306"/&amp;gt;
            &amp;lt;param name="login" value="root"/&amp;gt;
@@ -171,6 +171,102 @@
    primary key(start_date,dimension1)
    );

+###3GPP XML file appenders
+The 3GPP appenders are used to generate statistic files for telecommunication systems according to the 3GPP specifications. Each Object type is stored in separated file. The following table link the appender class to the vesrion
+
+Version|Class
+-------|-------------------
+3GPP TS 32.435 version 7.2.0 Release 7|com.kpi4j.appender.XML3GppTs32Dot435V7Dot2Appender
+
+####Appender configuration: 3GPP TS 32.435 version 7.2.0 Release 7
+
+The configuration of this 3GPP version can be done by defining the parameters vendorName, dnPrefix, localDn, elementType, swVersion and directory where the statistic files will be saved.
+
+The statistics file names corresponds to the Object type names with start time and end time.
+
+Bellow a configuration example for the object type RncFunction.
+
+    
+    &amp;lt;config&amp;gt;
+       &amp;lt;Collector name="node1" schedulingPattern="* * * * *"&amp;gt;
+           &amp;lt;ObjectType name="RncFunction"&amp;gt;
+               &amp;lt;Dimensions&amp;gt;
+                   &amp;lt;Dimension name="RncFunction" type="String"/&amp;gt;
+                   &amp;lt;Dimension name="UtranCell" type="String"/&amp;gt;
+               &amp;lt;/Dimensions&amp;gt;
+               &amp;lt;Counters&amp;gt;
+                   &amp;lt;Counter name="attTCHSeizures" type="Integer"/&amp;gt;
+                   &amp;lt;Counter name="succTCHSeizures" type="Integer"/&amp;gt;
+                   &amp;lt;Counter name="attImmediateAssignProcs" type="Integer"/&amp;gt;
+                   &amp;lt;Counter name="succImmediateAssignProcs" type="Integer"/&amp;gt;
+                   &amp;lt;Counter name="ethernetStatsBroadcastTx" type="Integer"/&amp;gt;
+               &amp;lt;/Counters&amp;gt;
+           &amp;lt;/ObjectType&amp;gt;
+           &amp;lt;Appender class="com.kpi4j.appender._3gpp.XML3GppTs32Dot435V7Dot2Appender"&amp;gt;
+               &amp;lt;param name="vendorName" value="CompanyNN"/&amp;gt;
+               &amp;lt;param name="dnPrefix" value="DC=a1.companyNN.com,SubNetwork=1,IRPAgent=1"/&amp;gt;
+               &amp;lt;param name="localDn" value="SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1"/&amp;gt;
+               &amp;lt;param name="elementType" value="RNC"/&amp;gt;
+               &amp;lt;param name="userLabel" value="RNC Telecomville"/&amp;gt;
+               &amp;lt;param name="swVersion" value="R30.1.5"/&amp;gt;
+               &amp;lt;param name="directory" value="C:/statistics/"/&amp;gt;
+           &amp;lt;/Appender&amp;gt;
+       &amp;lt;/Collector&amp;gt;
+    &amp;lt;/config&amp;gt;
+
+
+the output file of the configuration above looks like:
+
+   
+   
+   &amp;lt;measCollecFile xmlns="http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec"&amp;gt;
+     &amp;lt;fileHeader CompanyNN="CompanyNN" dnPrefix="DC=a1.companyNN.com,SubNetwork=1,IRPAgent=1" fileFormatVersion="32.435 V7.2.0"&amp;gt;
+       &amp;lt;fileSender elementType="RNC" localDn="SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1"/&amp;gt;
+       &amp;lt;measCollec beginTime="2016-01-15T16:04:00+0000"/&amp;gt;
+     &amp;lt;/fileHeader&amp;gt;
+     &amp;lt;measData&amp;gt;
+       &amp;lt;managedElement localDn="SubNetwork=CountryNN,MeContext=MEC-Gbg-1,ManagedElement=RNC-Gbg-1" swVersion="R30.1.5" userLabel="RNC Telecomville"/&amp;gt;
+     &amp;lt;/measData&amp;gt;
+     &amp;lt;measInfo&amp;gt;
+       &amp;lt;granPeriod duration="PT60S" endTime="2016-01-15T16:05:00+0000"/&amp;gt;
+       &amp;lt;repPeriod duration="PT60S"/&amp;gt;
+       &amp;lt;measType p="1"&amp;gt;attTCHSeizures&amp;lt;/measType&amp;gt;
+       &amp;lt;measType p="2"&amp;gt;succTCHSeizures&amp;lt;/measType&amp;gt;
+       &amp;lt;measType p="3"&amp;gt;attImmediateAssignProcs&amp;lt;/measType&amp;gt;
+       &amp;lt;measType p="4"&amp;gt;succImmediateAssignProcs&amp;lt;/measType&amp;gt;
+       &amp;lt;measType p="5"&amp;gt;ethernetStatsBroadcastTx&amp;lt;/measType&amp;gt;
+       &amp;lt;measValue measObjLdn="RncFunction=RF-1,UtranCell=Gbg-2"&amp;gt;
+         &amp;lt;r p="1"&amp;gt;2990&amp;lt;/r&amp;gt;
+         &amp;lt;r p="2"&amp;gt;2988&amp;lt;/r&amp;gt;
+         &amp;lt;r p="3"&amp;gt;2927&amp;lt;/r&amp;gt;
+         &amp;lt;r p="4"&amp;gt;2962&amp;lt;/r&amp;gt;
+         &amp;lt;r p="5"&amp;gt;3006&amp;lt;/r&amp;gt;
+       &amp;lt;/measValue&amp;gt;
+       &amp;lt;measValue measObjLdn="RncFunction=RF-1,UtranCell=Gbg-1"&amp;gt;
+         &amp;lt;r p="1"&amp;gt;3008&amp;lt;/r&amp;gt;
+         &amp;lt;r p="2"&amp;gt;2978&amp;lt;/r&amp;gt;
+         &amp;lt;r p="3"&amp;gt;2969&amp;lt;/r&amp;gt;
+         &amp;lt;r p="4"&amp;gt;2982&amp;lt;/r&amp;gt;
+         &amp;lt;r p="5"&amp;gt;2969&amp;lt;/r&amp;gt;
+       &amp;lt;/measValue&amp;gt;
+       &amp;lt;measValue measObjLdn="RncFunction=RF-2,UtranCell=Gbg-1"&amp;gt;
+         &amp;lt;r p="1"&amp;gt;2983&amp;lt;/r&amp;gt;
+         &amp;lt;r p="2"&amp;gt;2963&amp;lt;/r&amp;gt;
+         &amp;lt;r p="3"&amp;gt;3019&amp;lt;/r&amp;gt;
+         &amp;lt;r p="4"&amp;gt;2892&amp;lt;/r&amp;gt;
+         &amp;lt;r p="5"&amp;gt;3018&amp;lt;/r&amp;gt;
+       &amp;lt;/measValue&amp;gt;
+       &amp;lt;measValue measObjLdn="RncFunction=RF-2,UtranCell=Gbg-2"&amp;gt;
+         &amp;lt;r p="1"&amp;gt;2997&amp;lt;/r&amp;gt;
+         &amp;lt;r p="2"&amp;gt;2934&amp;lt;/r&amp;gt;
+         &amp;lt;r p="3"&amp;gt;2860&amp;lt;/r&amp;gt;
+         &amp;lt;r p="4"&amp;gt;3024&amp;lt;/r&amp;gt;
+         &amp;lt;r p="5"&amp;gt;2904&amp;lt;/r&amp;gt;
+       &amp;lt;/measValue&amp;gt;
+     &amp;lt;/measInfo&amp;gt;
+   &amp;lt;/measCollecFile&amp;gt;
+
+
 ##Library performance

 ###Test environment
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zahid Mohammed</dc:creator><pubDate>Fri, 15 Jan 2016 22:16:15 -0000</pubDate><guid>https://sourceforge.netc3c00e6d726d33127a1c3beca09d6f8171246ae4</guid></item><item><title>Home modified by Zahid Mohammed</title><link>https://sourceforge.net/p/kpi4j/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -81,7 +81,8 @@

     }

-Output file sample:
+###SimpleXMLFileAppender
+the output file sample bellow is generated when using the appender **com.kpi4j.appender.SimpleXMLFileAppender** :

     
     &amp;lt;Statistics&amp;gt;
@@ -98,5 +99,93 @@
            &amp;lt;/dimension2&amp;gt;
        &amp;lt;/ObjectType&amp;gt;
     &amp;lt;/Statistics&amp;gt;
-    
+
+###JDBCAppender
+
+If you want to save performance records directly in JDBC database such use Mysql, Postgresql, MariaDB, Oracle ... you can use the appender **com.kpi4j.appender.JDBCAppender** for this task.
+
+####JDBCAppender dependencies
+
+Developer should add the JDBC driver that corresponds to the database
+
+**Mysql dependency**
+
+       &amp;lt;dependency&amp;gt;
+           &amp;lt;groupId&amp;gt;mysql&amp;lt;/groupId&amp;gt;
+           &amp;lt;artifactId&amp;gt;mysql-connector-java&amp;lt;/artifactId&amp;gt;
+           &amp;lt;version&amp;gt;5.1.30&amp;lt;/version&amp;gt;
+       &amp;lt;/dependency&amp;gt;
+
+**MariaDB dependency**
+
+       &amp;lt;dependency&amp;gt;
+           &amp;lt;groupId&amp;gt;org.mariadb.jdbc&amp;lt;/groupId&amp;gt;
+           &amp;lt;artifactId&amp;gt;mariadb-java-client&amp;lt;/artifactId&amp;gt;
+           &amp;lt;version&amp;gt;1.2.0&amp;lt;/version&amp;gt;
+       &amp;lt;/dependency&amp;gt;
+
+**Postgresql dependency**
+
+    &amp;lt;dependency&amp;gt;
+       &amp;lt;groupId&amp;gt;postgresql&amp;lt;/groupId&amp;gt;
+       &amp;lt;artifactId&amp;gt;postgresql&amp;lt;/artifactId&amp;gt;
+       &amp;lt;version&amp;gt;VERSION&amp;lt;/version&amp;gt;
+    &amp;lt;/dependency&amp;gt;
+
+####JDBCAppender configuration
+
+The configuration of **Appender** tag should look like:
+
+    &amp;lt;Appender class="com.kpi4j.appender.JDBCAppender"&amp;gt;
+           &amp;lt;param name="host" value="localhost"/&amp;gt;
+           &amp;lt;param name="port" value="3306"/&amp;gt;
+           &amp;lt;param name="login" value="root"/&amp;gt;
+           &amp;lt;param name="password" value="root"/&amp;gt;
+           &amp;lt;param name="driver" value="com.mysql.jdbc.Driver"/&amp;gt;
+           &amp;lt;param name="type" value="mysql"/&amp;gt;
+           &amp;lt;param name="database" value="kpi4j"/&amp;gt;
+    &amp;lt;/Appender&amp;gt;
+
+Where:
+ * host: the database host name
+ * port: the database port
+ * login: the database login
+ * password: the database password
+ * driver: the JDBC driver com.mysql.jdbc.Driver for mysql, org.mariadb.jdbc.Driver for mariaDB ...
+ * type: the database type: mysql, mariadb or postgresql ...
+ * database: the database schema name in which the performance records will be stored.
+
+####Database pre-requisites 
+
+The database should be prepared before executing the program. The object types should correspond to tables with the same names and the dimension should be declared as a primary keys. Developer should also add two datetime fields which are **start_date (primary key)** and **end_date**.
+Following the configuration file above, the corresponding table should be:
+
+
+   create table ot1 (
+   start_date datetime not null,
+   end_date datetime,
+   dimension1 varchar(45) not null,
+   applicationId int,
+   ctr1 int,
+   ctr2 bigint,
+   primary key(start_date,dimension1)
+   );
+
+##Library performance
+
+###Test environment
+
+ * Dual core i5 2.60 GHz
+ * RAM: 4 Go
+ * OS: Windows 7 pro 64 bit
+ * JRE version 1.7.0_75
+
+###Result
+
+The library test was performed by creating **100** concurrent threads that increment randomly counters with 1 dimension depth.
+
+This test shows that the average duration of incrementing a counter is **180 ns** (nanosecond).
+
+
+
 For any further question, fell free to contact me at zahid.med@gmail.com
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zahid Mohammed</dc:creator><pubDate>Sun, 10 Jan 2016 21:10:06 -0000</pubDate><guid>https://sourceforge.net6b2c716d57102164a3372aad97dc552012875dc4</guid></item><item><title>Home modified by Zahid Mohammed</title><link>https://sourceforge.net/p/kpi4j/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,8 +1,102 @@
-Welcome to your wiki!

-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
+#kpi4j
+##What is it?

-The wiki uses [Markdown](/p/kpi4j/wiki/markdown_syntax/) syntax.
+This is an open source library that allows generating performance indicators easily for java based application. This library is configurable through an xml file (similar to log4j) in order to define the performance object types, dimensions, counters, the output format and statistics generation periodicity. Those statistics can be saved as a file (xml/json) or injected directly in a database. Then they can be correlated and analyzed through any Business Intelligence solution in order to check the application performance and quality: number of transactions, ratio of successful and failure ...

-[[members limit=20]]
-[[download_button]]
+##Some concepts
+
+In order to retrieve the application statistics, developer should be aware of three main concepts:
+ * Object type: is a group of counters that belong to the same feature or behavior.
+ * Dimension: distinguish the counters of the same Object type. for example when providing a web service for many customers, developer can distinguish between the customers statistics by adding a dimension "customer" that have as a value the customer name or identifier.
+ * Counter: define the statistic developer want to retrieve. For example number of opened sessions, number of successful and failed transactions ....
+
+##Dependencies
+
+When using kpi4j, add the following dependencies:
+
+    &amp;lt;dependency&amp;gt;
+       &amp;lt;groupId&amp;gt;log4j&amp;lt;/groupId&amp;gt;
+       &amp;lt;artifactId&amp;gt;log4j&amp;lt;/artifactId&amp;gt;
+       &amp;lt;version&amp;gt;1.2.17&amp;lt;/version&amp;gt;
+    &amp;lt;/dependency&amp;gt;
+    &amp;lt;dependency&amp;gt;
+       &amp;lt;groupId&amp;gt;it.sauronsoftware.cron4j&amp;lt;/groupId&amp;gt;
+       &amp;lt;artifactId&amp;gt;cron4j&amp;lt;/artifactId&amp;gt;
+       &amp;lt;version&amp;gt;2.2.5&amp;lt;/version&amp;gt;
+    &amp;lt;/dependency&amp;gt;
+    &amp;lt;dependency&amp;gt;
+       &amp;lt;groupId&amp;gt;xml-apis&amp;lt;/groupId&amp;gt;
+       &amp;lt;artifactId&amp;gt;xml-apis&amp;lt;/artifactId&amp;gt;
+       &amp;lt;version&amp;gt;1.3.04&amp;lt;/version&amp;gt;
+    &amp;lt;/dependency&amp;gt;
+
+##How use it?
+
+###Configuration
+Using kpi4j is made by creating a configuration file /resources/kpi4j.xml like this one
+
+    &amp;lt;config&amp;gt;
+       &amp;lt;Collector name="collector1" schedulingPattern="* * * * *"&amp;gt;
+           &amp;lt;ObjectType name="ot1"&amp;gt;
+               &amp;lt;Dimensions&amp;gt;
+                   &amp;lt;Dimension name="dimension1" type="String"/&amp;gt;
+               &amp;lt;/Dimensions&amp;gt;
+               &amp;lt;Counters&amp;gt;
+                   &amp;lt;Counter name="applicationId" type="Integer" value="1"/&amp;gt;
+                   &amp;lt;Counter name="ctr1" type="Integer"/&amp;gt;
+                   &amp;lt;Counter name="ctr2" type="Long"/&amp;gt;
+               &amp;lt;/Counters&amp;gt;
+           &amp;lt;/ObjectType&amp;gt;
+           &amp;lt;Appender class="com.kpi4j.appender.SimpleXMLFileAppender"&amp;gt;
+               &amp;lt;param name="file" value="C:/statistics/stsFile"/&amp;gt;
+           &amp;lt;/Appender&amp;gt;
+       &amp;lt;/Collector&amp;gt;
+    &amp;lt;/config&amp;gt;
+
+ * Collector: is the process that will manage the statistics defined inside this tag and save them using the indicated Appender according to the crontab defined in the attribute schedulingPattern.
+ * ObjectType: is the object type, the name should be unique in the Collector
+ * Dimension: is the statistic dimension. The dimension is defined by a name and type (Integer, Long, String, Float or Boolean).
+ * Counter: is defined by it's name which would be unique in the ObjectType tag, type (Integer, Long, String, Float or Boolean). if the attribute value is defined, the counter will be initialized with that value.
+ Appender: defines the output format in which the statistics will be stored. The current version supports only xml format.
+
+###Call in the application source code
+
+Similar to log4j, developer can call the collector by its name, then use it to increment counters values.
+
+code example based on the above configuration file
+
+    public class HelloKpi4j{
+    
+       public static Collector collector=Collector.getCollector("collector1");
+    
+       public static void main(String[] args) {
+           //increment the counter "ctr1" of the dimension "client1" by 1
+           collector.incrementCounter("ObjectType","ot1","dimension1","client1","ctr1",1);     
+           //increment the counter "ctr2" of the dimension "client2" by 3
+           collector.incrementCounter("ObjectType","ot1","dimension1","client2","ctr2",3L);
+       }
+    
+    }
+    
+    }
+
+Output file sample:
+
+    
+    &amp;lt;Statistics&amp;gt;
+       &amp;lt;ObjectType name="ot1"&amp;gt;
+           &amp;lt;StartDate&amp;gt;201601071220&amp;lt;/StartDate&amp;gt;
+           &amp;lt;EndDate&amp;gt;201601071221&amp;lt;/EndDate&amp;gt;
+           &amp;lt;dimension1 value="client1"&amp;gt;
+               &amp;lt;ctr1&amp;gt;1&amp;lt;/ctr1&amp;gt;
+               &amp;lt;ctr2&amp;gt;0&amp;lt;/ctr2&amp;gt;
+           &amp;lt;/dimension1&amp;gt;
+           &amp;lt;dimension2 value="client2"&amp;gt;
+               &amp;lt;ctr1&amp;gt;0&amp;lt;/ctr1&amp;gt;
+               &amp;lt;ctr2&amp;gt;3&amp;lt;/ctr2&amp;gt;
+           &amp;lt;/dimension2&amp;gt;
+       &amp;lt;/ObjectType&amp;gt;
+    &amp;lt;/Statistics&amp;gt;
+    
+For any further question, fell free to contact me at zahid.med@gmail.com
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zahid Mohammed</dc:creator><pubDate>Thu, 07 Jan 2016 16:12:32 -0000</pubDate><guid>https://sourceforge.net0402766b2d540b2c42e8f8dcd4aa52c9a15cd372</guid></item><item><title>Home modified by Zahid Mohammed</title><link>https://sourceforge.net/p/kpi4j/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/p/kpi4j/wiki/markdown_syntax/"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;h6&gt;Project Members:&lt;/h6&gt;
	&lt;ul class="md-users-list"&gt;
		&lt;li&gt;&lt;a href="/u/kimposte/"&gt;Zahid Mohammed&lt;/a&gt; (admin)&lt;/li&gt;
		
	&lt;/ul&gt;&lt;br/&gt;
&lt;p&gt;&lt;span class="download-button-568e8cbe24b0d911f169e539" style="margin-bottom: 1em; display: block;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zahid Mohammed</dc:creator><pubDate>Thu, 07 Jan 2016 16:05:18 -0000</pubDate><guid>https://sourceforge.net45c222d165d7e9cf3ea9e5f61c7a2eb9154ede4f</guid></item></channel></rss>