473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to use performance graph in jsp

hi,
i just want to use performance graph in jsp page could any body help me .

Thanks in Advance
Ramprakash
Apr 8 '09 #1
1 1968
chaarmann
785 Expert 512MB
Use an image tag that references to a 1-dot image of your chosen bar color. Then enlarge the image in width and height according to your performance results. Use these images in table cells and write number on top.

code snippet from my application:
Expand|Select|Wrap|Line Numbers
  1.     <% // display the graph. %>
  2.     <%
  3.         for (int itemIndex = graphStart, lastIndex = Math.min(numberOfItems, graphStart + MAX_COLUMNS_PER_GRAPH); itemIndex < lastIndex; itemIndex++)
  4.     {
  5.         // compute the height of the column
  6.         StatisticsItem currentItem = (StatisticsItem) statisticsList.elementAt(itemIndex);
  7.         double yCoordValue = currentItem.getYCoordValue();
  8.         int height = (int) (MAX_BAR_HEIGHT * yCoordValue / maxYCoordValue);
  9.  
  10.         // compute the label of the column. Show the value either as integer or fraction.
  11.             String yCoordLabel = (yCoordValue == (int) yCoordValue) ? String.valueOf((int) yCoordValue) : decimalFormat.format(yCoordValue);
  12.         %>
  13.  
  14.         <% // display the graph columns %>
  15.         <% // bugfix: the SPAN element must be surrounded by a table, else it will show and print each column on a different page in the print preview of the Internet Explorer %>
  16.         <td width=<%= BAR_WIDTH %>></td>
  17.         <td align=center width=<%= BAR_GAP %> valign="bottom">
  18.             <table cellspacing="0" cellpadding="0" border=0>
  19.                     <tr>
  20.                         <td>
  21.                   <span class=blackLittleText style="writing-mode:tb-rl">
  22.                      <%= yCoordLabel %>
  23.                   </span>
  24.                         </td>
  25.                     </tr>
  26.             </table>
  27.             <%= statisticsImages.getImage("BLUE_BAR", "style='background-color:#31659C' width=" + BAR_WIDTH + " height=" + height) %>
  28.         </td>
  29.  
  30.     <%
  31.     } // end of for-loop
  32. %>
  33.  

You can also try with divs and background color and position them next to each other.
Apr 8 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

49
by: Paul Rubin | last post by:
I've started a few threads before on object persistence in medium to high end server apps. This one is about low end apps, for example, a simple cgi on a personal web site that might get a dozen...
0
by: Robby Dermody | last post by:
Hey guys (thus begins a book of a post :), I'm in the process of writing a commercial VoIP call monitoring and recording application suite in python and pyrex. Basically, this software sits in a...
0
by: Bijesh | last post by:
Hi All, I'm using the .NET performance counters to calculate the network utilization. But this value exceeds 100%. In most of the cases, it is very similar to the one shown in the task-manager....
0
by: bimalendug | last post by:
Hi All, I'm using the .NET performance counters to calculate the network utilization. But this value exceeds 100%. In most of the cases, it is very similar to the one shown in the task-manager....
4
by: tharma | last post by:
I was wondering if some one provides some information about scalability and performance of ASP vs JSP (not ASP.NET). Scalability of JSP vs. ASP (which one is better?) Performance of JSP vs....
22
by: roadrunner | last post by:
Hi, Our website has recently been experiencing some problems under load. We have pinpointed a particular function which slows dramatically when we have these problems. Normally it should execute...
0
by: momobear | last post by:
Type the "taskmgr", Windows performance Graph give a really nice dynamic history curve, It will be wonderful If I could use the same kind of graph to represent the network flow in my python...
3
by: Eric Jonas | last post by:
Hello, I've done some benchmarking while attempting to serialize my (large) graph data structure with cPickle; I'm seeing superlinear performance (plotting it seems to suggest n^2 where n is the...
0
by: Calvin Spealman | last post by:
If you are getting to the point where your data is large enough to really care about the speed of cPickle, then maybe its time you moved past pickles for your storage format? 2.5 includes sqlite,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.