computing performance [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I need to find out the time a function takes for computing the performance of the application / function.
is their any open source Java APIs for doing the same ?

You're in luck as there are quite a few open source Java profilers available for you.

Take a look at the official TPTP plugin for Eclipse. This pretty much does all you describe and a (frikkin') whole lot more. I can really recommend it.

I don't know if there are APIS, but you normally use the funciton currenttimemillis for that... You measure the time at the beggining, then again at the end of the execution and voila!!! you got your time substracting

Hiperic provide a GPLv2 licenced tool for monitoring all sort of system resources called SIGAR (System Information Gatherer and Reporter).
This tool is used to provide things like adaptive load balancing in GridGain (a grid computing framework).
http://www.hyperic.com/products/sigar.html

Have a look to this question : Which java profiling tool do you use and which tool you think is the best ?

If it's just one function you care about, wrap a million-iteration loop around it, and time it with a stopwatch. Then seconds translate to microseconds.
On the other hand, if you want to speed it up, all you need is this.

Related

Looking for a "web-scraping script builder" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm writing the code to access and download data from some web sites using HTMLUnit.
I was wondering whether a tool that could help me exists. I think maybe to a visual tool, something that lets you express the path you want to follow on the web sites visually and generates the Java code.
I'd like something for HTMLUnit, but I'm open to other solutions.
Writing screen-scraping code gets very repetitive :(
I used to work at screen-scraper. Not sure if it's quite what you're looking for, but it's definitely a powerful tool for building web-scraping scripts.
Not exactly visual tools, but maybe you could use something like JMeter or The Grinder for recording navigation scripts of web pages. They surely are easier to use than writing all the input requests by hand in HTMLUnit.
There is only one tool that does exactly this - and does it very very well - but it's highly expensive, since their technology is amazing. Some of the biggest companies uses this. I think you might be able to get a free trail, if you want to try it out. http://kapowsoftware.com/

Can anyone recommend a scriptable Java profiler? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 months ago.
Improve this question
I want to automate our field case analysis.
We sometimes get HPROF files from crashes of our product in production, and look for "typical" problems we know of. Examples:
specific threads creating problems
specific classes filling up the heap
etc.
Currently the HPROF analysis is done manually.
I want to automate that.
Does anyone know of a good Java profiler who allows that? I know Yourkit and JProfiler quite well, and am unaware of such features.
Thank you!
You can find something in VisualVM. It integrates the OQL scripting engine and allows you to persist your own queries so you can easily run them against various heap dumps. However, it is not yet ready for headless analysis.
The OQL implementation in VisualVM is based on the one you can find in jhat and it means that it is javascript based - in addition to "standard" OQL queries it allows you to use plain javascript thus increasing the flexibility many times.
There are few examples of the javascript analysis bundled with VisualVM or you can use the user mailing list to get help.
Cheers!

Simple open source DHT implementation in Java for learning purposes [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for recommendations for a simple open source implementation of a Distributed Hash Table in Java to play around with. No fancy features, just for learning purposes, no production functionality needed. It should be simple to set up (e.g. 1 physical machine with n-JVMs) and well documented preferably with some examples, tutorials or starting guides.
Research yields these candidates: FreePastry and OpenChord but I'm not fully convinced they meet my criteria simplicity-wise.
Have you got any experience with these or other implementations? Recommendations?
Thanks & adios
There is TomP2P on Github.
Maybe JDHT will fit the bill. I haven't checked it out myself, but it's written at a university, sometimes that means it's simple and used for teaching. :-)
I have been working on an implementation of Kademlia lately. It's very simple to setup and use and it's well documented. There are several tests written that demonstrate the different functionality as well as a starting guide in the Readme.md file itself.
You can use openkad
I started with free pastry..I've had a great experience with it. It was very simple to set up and run a ring of nodes. I've been mainly using PAST (File storage) and its been quite easy to get running. I'd suggest having a look at the PAST tutorial here. https://trac.freepastry.org/wiki/tut_past
The code is over simplified in my opinion but you say that is all you need so I guess thats ok.

Clojure/Java: Java libraries for spectrum analysis of sound? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am looking for a library that can accept a chunk of audio data and return the average amplitude over time within a given frequency band.
I've already asked this question over at comp.dsp, but it's clear to me that acquiring the know-how to build this on my own using a basic FFT library is going to require more time and energy than I have at present. Here is my original question with more detai: http://groups.google.com/group/comp.dsp/browse_thread/thread/e04f78d439e9e2bd
I've found lots of nice libraries for playing with sound (I used JSyn in the past), but none of these seem to be set up to return quick and dirty spectral information about a sound sample.
Any pointers would be much appreciated.
This Archived Blog shows a java implementation of the FFT algorithm which is very concise and reads audio files and calculates the frequency spectrum.
You could also check Jtranforms open source FFT library
Unfortunately the blog is gone, here are some other resources on FFT.
http://web.archive.org/web/20160301081621/http://www.wikijava.org/wiki/The_Fast_Fourier_Transform_in_Java_(part_1)
http://www.royvanrijn.com/blog/2010/06/creating-shazam-in-java/
Not java but added for the explanation: https://jakevdp.github.io/blog/2013/08/28/understanding-the-fft/
have a look at the jAudio package in jMir, there is probably much more than what you need ...
Have you taken a look at this:
http://download.oracle.com/javase/tutorial/sound/TOC.html
I have also used the Java Media Framework for video processing but I believe that they provide a good API for sound processing too. You should also look into that.

Pie, Bar, Line charts in java? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to use Pie, Bar, Line charts in java. What is the best API to use them? Is there any API by Sun to create these types of charts?
take a look at JFreeChart.. it's not by SUN but it's quite notorious (and by the way I don't think JDK ships with any kind of graph API)
Use JFreeChart like everyone who responded suggested or if that doesn't work for you check this SO question:
what-is-the-best-open-source-java-charting-library-other-than-jfreechart
Use jFreeChart
"JFreeChart is "open source" or, more specifically, free software. It is distributed under the terms of the GNU Lesser General Public Licence (LGPL), which permits use in proprietary applications."
JFreeChart is free to use, and there are numerous "simple" examples on their website, as well as API documentation.
If it's useful to you, and if you start using anything more than really basic graphs, you might consider purchasing the full documentation with more detailed examples and guides on how to use it to the max of its power. It will certainly boost your productivity and also help to support the project.
I couldn't find any documentation about JFreeChart, so I forked jcckit to https://bitbucket.org/hughperkins/easyjcckit , and added a simple 'plot(double[] xvalues, double[] yvalues )' method for line graphs.

Categories

Resources