Sunday, 12 July 2015

Performance Measurement tool - JProfiler





Jprofiler Performance tuning tool

Jprofiler is the Performance Measurement Tool. With the help of profiler we can profiling of Memory  CPU, and Thread  into one application.

JProfiler is a commercially licensed. Java profiling tool developed by ej-technologies GmbH.
It is mainly designed for use with Java EE and Java SE applications.

a. Memory Profiling
b. CPU Load Measurement
c. Thread Analysis



 JProfiler Mainly used for the developers. With the helo of this tool developers can analyze memory leaks, performance bottlenecks and  CPU loads, threading issues also.

  Type of Profiling


It supports to type of profiling-
1. Local Profiling
2. Remote Profiling


1.Local Profiling -When applications are running on the same machine on which the JProfiler software is installed. Its called as Local profiling.

 2.Remote Profiling - When Java applications are running on remote machines on which JProfiler     software is not installed on. Its called as Remote profiling.

Supported Platforms of Jprofiler
  • Linux
  • Mac OS X
  • Windows
  • Solaris
 Performance Analysis
Finding out the Performance problem where all the time is spent is JProfiler's with hep of  "Hot spots view". The top entries will show most time consuming methods.  We can expend the top level nodes,

JProfiler's heap walker measure the allocation problem. After taking a heap snapshot, we can see classes view and find that more than half a million objects are still alive on the heap.

Features of Jprofiler

  • Offline profiling and triggers 

  • Live profiling of a remote session  

  • Live profiling of a local session 

  • Viewing an HPROF snapshot


Memory Profiling

 JProfiler's memory profiling dynamically updated on the basis of  memory usage and show information about allocations spots. 

We can View below mentioned point at the time of Memory analysis-
  • All objects
  • Recorded objects
  • Class tracker  
  • Allocation call tree
  • Allocation hot spots


CPU Profiling

JProfiler CPU Profiling , various ways to record the call tree to optimize for performance. The thread or thread group as well as the thread status can be chosen for all views.

 The CPU Profiling can trace following points-
  • Call tree
  • Hot spots
  • Call graph
  • Method statistics
  • Call tracer

Thread Profiling

For thread profiling, JProfiler can profile following things-
  • Thread history
  • Thread monitor
  • Thread dumps 



Monitor Profiling

For monitor profiling, JProfiler offers the following views:
  • Current locking graph
  • Current monitors
  • Locking history graph
  • Monitor usage statistics 


VM telemetry

To observe the internal state of your JVM, JProfiler offers various telemetry views:
  • Heap
  • Recorded objects
  • Recorded throughput
  • GC activity
  • Classes
  • Threads
  • CPU load

Thursday, 9 July 2015

Latest Asked Interview Question





 

Latest Java Interview Questions

 

Questions of Java Technology




1.Cache Algorithm
Answer:

a.LRUCache (least recently used )
b.FIFOCache
c.UnlimitedCache


2. Why is StringBuffer called mutable?

 Answer: The String class is considered as immutable, so that once it is created a String object cannot be changed. If there is a necessity to make alot of modifications to Strings of characters then StringBuffer should be used.





Tuesday, 7 July 2015

Java Main Method and Why it's declared as public static void main(String args[])

Main method in Java is used by JVM to start execution of any Java program. This method must appear within a class. Main method is entry point of Core.

 Java application.But In case of server related applications like EJB,Servlet these Java programs have there own life-cycle methods like init(), service() or destory().

Java Main Method:

The main() method in C++, C# and Java are static because they can then be invoked by the runtime engine without having to instantiate an instance of the parent class.

Syntax: public static void main(String[] args) 


Java Main Method and Why it's declared as public static void main(String args[])

Java Main Method Example :

Source Code:
 
class TechnicalUpdatesHub {

  public static void main(String args[])
   { 

      System.out.println("Hey I am in Technical Updates Hub main Method");

   }

   public static  void main(int i)
   { 
      System.out.println("Hey I am in Technical Updates Hub Overloaded main Method");  
   } 
 
 }

Output:

Hey I am in Technical Updates Hub main Method
Hey I am in Technical Updates Hub Overloaded main Method


Java main method is static because JVM can call it without creating any instance of class. main method is public in Java because JVM can easily access and execute it.

Main method in Java is not supposed to return any value. Note: JVM throws NoSuchMethodException:main. if it doesn't find main method of predefined signature in class.

Main method is run by a special thread called "main" thread in Java. Main method in Java can be overloaded like any other method in Java but JVM will only call main method with specified signature.

Contact Us

Want to ask anything? Be our guest, give us a message.

Name Email * Message *

FaceBook Like