namebench

Here you can post links to your contributed packages.
Post Reply
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

namebench

Post by pwatk »

Interesting DNS server benchmarking tool based on python. There is a GUI but I'm happy with the commandline interface. depfinder also lists the python socks and python System modules as dependencies but this didn't seam to affect anything (I'm not big on python so someone update me if I'm wrong).

FTP link: namebench
Last edited by pwatk on 6. Sep 2010, 18:58, edited 7 times in total.
Image
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: namebench

Post by laprjns »

Since this is a python apps,shouldn't the arch be set to noarch? Anyway it works. Here's my results:
http://namebench.appspot.com/id/1027014
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: namebench

Post by thenktor »

laprjns wrote:Since this is a python apps,shouldn't the arch be set to noarch? Anyway it works. Here's my results:
http://namebench.appspot.com/id/1027014
Python apps usually are compiled to some bytecode. I don't think it is arch independent. Can someone else clarify this?
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: namebench

Post by damNageHack »

thenktor wrote:Python apps usually are compiled to some bytecode. I don't think it is arch independent. Can someone else clarify this?
PYC -> Compiled python bytecode, arch independent (as far as i can understand)
PYO -> Optimized, assert statements removed
A program doesn't run any faster when it is read from a ‘.pyc’ or ‘.pyo’ file than when it is read from a ‘.py’ file; the only thing that's faster about ‘.pyc’ or ‘.pyo’ files is the speed with which they are loaded.
http://www.network-theory.co.uk/docs/py ... files.html

But be aware of the depending site-packages, often depending on binary compiled .so libraries (arche-dependent!) or installing as site-packages themselfs. Good example: Miro or translate-toolkit

Read also this: http://bytes.com/topic/python/answers/2 ... ndependent
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: namebench

Post by pwatk »

Oops that it is a mistake, I meant to put noarch.

This line makes sure everything is installed into the correct site-packages directory for the current system's architecture:

Code: Select all

pythonlib=$( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" )
Edit: if I was submitting this for inclusion to the Salix repository I'd probably change this approach.
Image
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: namebench

Post by pwatk »

On second thoughts I've updated the script to take in to account any eventuality ;).
Image
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: namebench

Post by damNageHack »

pwatk wrote:

Code: Select all

pythonlib=$( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" )
Edit: if I was submitting this for inclusion to the Salix repository I'd probably change this approach.
Oh, thanks for your hint with the one-line code :)
But unfortunately, this would not solve the problem of arch-dependent binary compiled libraries(*.so) in the site-packages folder. It is better to have different packages each with a specific arch sign in its name to get clarified that issue.
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: namebench

Post by pwatk »

damNageHack wrote:
pwatk wrote:

Code: Select all

pythonlib=$( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" )
Edit: if I was submitting this for inclusion to the Salix repository I'd probably change this approach.
Oh, thanks for your hint with the one-line code :)
But unfortunately, this would not solve the problem of arch-dependent binary compiled libraries(*.so) in the site-packages folder. It is better to have different packages each with a specific arch sign in its name to get clarified that issue.
I stole the one-liner from a script by Eric Hameleers (Alien Bob) :).

I added this to the script last night to tag the package and address the lib arch dependencies:

Code: Select all

arch=$(uname -m)
Although this will tag the package as i686 for most systems it's simpler than this (my first idea):

Code: Select all

...
pythonver=$( python -c "from distutils.sysconfig import get_python_version; print get_python_version()" )
case "$arch" in
  i[3-6]86)
    pythonlib="/usr/lib/python$pythonver/site-packages/"
    ;;
  x86_64)
    pythonlib="/usr/lib64/python$pythonver/site-packages/"
    ;;
  *)
    pythonlib=$( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" )
    ;;
esac
...
There has got to be a way of displaying the system (libc) architecture without resorting to such vague actions as this:

Code: Select all

ls /usr | grep -E "i486|x86_64" | cut -f 1 -d -
Image
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: namebench

Post by damNageHack »

You know that the parameter arch is optional in SLKBUILD? slkbuild can detect it by itself with help from the host system, see man page.
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: namebench

Post by pwatk »

I obviously missed that one. Thanks.
Image
Post Reply