Technia Profiler
About:
The Profiler is a development tool to improve the quality and performance of your code and System. The profiler can be used to monitor all calls that are being made to the ENOVIA Kernel.
Profiler dynamically monitors the Enovia Kernel and reports all the calls being made to any "Profiler Client" that is connected.
Profiler Client is a standalone application that works with the Enovia system. From the Profiler client, you will be able to analyze all traffic and traceback up to the code that triggered the particular ENOVIA call. You can save the traces for future reference using Profiler Client.
Below is the architecture of the System showing where Profiler residing along with Enovia Application and how different components are dependant to each other.
Features:
It can be used to monitor all the distributed calls that are being made to the ENOVIA Kernel.
It is a standalone application that works along with Enovia.
It is used to collect and view all the logs in its own display window.
You can save and share all collected logs outside the Profiler system.
Getting a licence for Profiler:
You will be required Technia licence for Profiler to use this tool. The licence is available without any cost to Technia Members. Follow the instructions to get the licence:
Login to
Go to Tools-> Profiler
Select Release version for which you want to get a licence
Under Licence Tag you will get a link to download licence
Click on the link and it will automatically start downloading
Downloading Profiler:
Login to
Go to Tools-> Profiler
You will get a download Options Click on Current Release version no.
Under Binaries Tag you will get Profiler.zip file
Click on it and it will automatically start downloading
What you will get inside .zip file:
When you extract the Profiler.zip file you will get following 3 jars:
Java Agent (profiler-agent.jar) :
The Java Agent is required for being able to dynamically monitor the Matrix Kernel (technically this is implemented by using Aspects, AOP, using the AspectJ framework).
Server (profiler-server.jar):
The server is a JAR file that is being added to the web application you are profiling.
Client (profiler-client.jar):
The client is a JAR file containing the user interface and is connected to the profiler-server.
How to setup Profiler:
1· Copy all the jars to d:/apps/profiler location extracted from profiler.zip file
2· copy the file profiler-server.jar into the "WEB-INF/lib" folder of the application
To be exact :
D:\apps\3dexp\R2018x\3DSpace\win_b64\code\tomee\webapps\3dspace\WEB-INF\lib
3· Add the following filter to “web.xml” file:
NOTE: The filter definition should be added after the "Set Character Encoding Filter", which should be enabled if you are using Tomcat/TomEE.
<filter>
<filter-name>ProfilerAgentRequestFilter</filter-name>
<filter-class>com.technia.tva.profiler.server.web.HttpRequestFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ProfilerAgentRequestFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
4· Setting Runtime Environment for Profiler:
To set the runtime environment on Tomcat/TomEE, follow the below steps:
Open Command prompt.
run “<Tomcat bin path>TomEE //MS//3DSpaceTomEE_R2019x”
D:\apps\3dexp\V6R2019x\3DSpace\win_b64\code\tomee\bin>TomEE //MS//3DSpaceTomEE_R2019x
It will start showing the tomcat icon in desktop’s show hidden icon(^) option or near to it
right-click on it and choose > configure
select Java tab under Java Options: text area add the following arguments:
click on okay to save the changes for tomcat
To know more about adding arguments to Apache Tomcat watch the video provided in Extras section at the end of this blog
Add the following arguments to your Runtime environment:
-javaagent:d:/apps/profiler/profiler-agent.jar
-Dprofiler.db.user=creator
-Dprofiler.db.password=pass
You can select different Port and Host for profiler using the following (Optional):
-Dprofiler.port=8000
-Dprofiler.host=nameofhost
How to use/how it will help:
·Open cmd and run following command:
java -jar d:/apps/profiler/profiler-client.jar
· A popup will appear to provide a license. Browse to the license file we already downloaded click on OK.
· Application will get opened as below and you can connect to the server using connect button:
The moment you click on the connect button it will start trekking logs.
Navigate through the logs using the Profiler screen.
You can pause the trekking anytime using the pause button.
Clean the log screen using the clean button
To Disconnect click on the Connect button again.
Examples:
Screenshot of collected traces/logs using Profiler
Reference link:
Technia Profiler (old blog link)
Extras:
Adding Arguments to Apache Tomcat:
TECHNIA CONFIDENTIAL