tripanasoma / namebench

Automatically exported from code.google.com/p/namebench
0 stars 0 forks source link

[PATCH] concatenated data source results in failure #192

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install code via source

What is the expected output? What do you see instead?
Data is being looked for in /usr/local/share/namebench/usr/local/etc/namebench

I could not find "config/data_sources.cfg". Tried:
  /usr/ports/dns/py-namebench
  /usr/local/Contents/Resources
  /usr/ports/dns/py-namebench/namebench.app/Contents/Resources
  /usr/ports/dns/py-namebench/..
  /usr/local/namebench
  /usr/local/share/namebench/usr/local/etc/namebench
  /usr/local/namebench
  /etc/namebench
  /usr/share/namebench
  /usr/namebench
  /usr/local/lib/python2.7/site-packages/gtk-2.0
  /usr/local/lib/python2.7/site-packages/gtk-2.0/namebench
  /usr/local/lib/python2.7/site-packages/gst-0.10
  /usr/local/lib/python2.7/site-packages/gst-0.10/namebench
  /usr/local/lib/python2.7/site-packages
  /usr/local/lib/python2.7/site-packages/namebench
  /usr/local/lib/python2.7/lib-dynload
  /usr/local/lib/python2.7/lib-dynload/namebench
  /usr/local/lib/python2.7/lib-old
  /usr/local/lib/python2.7/lib-old/namebench
  /usr/local/lib/python2.7/lib-tk
  /usr/local/lib/python2.7/lib-tk/namebench
  /usr/local/lib/python2.7/plat-freebsd8
  /usr/local/lib/python2.7/plat-freebsd8/namebench
  /usr/local/lib/python2.7
  /usr/local/lib/python2.7/namebench
  /usr/local/lib/python27.zip
  /usr/local/lib/python27.zip/namebench
  /usr/local/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg
  /usr/local/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg/namebench
  /usr/local/lib/python2.7/site-packages/MarkupSafe-0.15-py2.7-freebsd-8.2-RELEASE-i386.egg
  /usr/local/lib/python2.7/site-packages/MarkupSafe-0.15-py2.7-freebsd-8.2-RELEASE-i386.egg/namebench
  /usr/local/lib/python2.7/site-packages/simplejson-2.1.6-py2.7-freebsd-8.2-RELEASE-i386.egg
  /usr/local/lib/python2.7/site-packages/simplejson-2.1.6-py2.7-freebsd-8.2-RELEASE-i386.egg/namebench
  /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
  /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/namebench
  /usr/local/bin
  /usr/local/bin/namebench
I could not find "config/namebench.cfg". Tried:
  /usr/ports/dns/py-namebench
  /usr/local/Contents/Resources
  /usr/ports/dns/py-namebench/namebench.app/Contents/Resources
  /usr/ports/dns/py-namebench/..
  /usr/local/namebench
  /usr/local/share/namebench/usr/local/etc/namebench
  /usr/local/namebench
  /etc/namebench
  /usr/share/namebench
  /usr/namebench
  /usr/local/lib/python2.7/site-packages/gtk-2.0
  /usr/local/lib/python2.7/site-packages/gtk-2.0/namebench
  /usr/local/lib/python2.7/site-packages/gst-0.10
  /usr/local/lib/python2.7/site-packages/gst-0.10/namebench
  /usr/local/lib/python2.7/site-packages
  /usr/local/lib/python2.7/site-packages/namebench
  /usr/local/lib/python2.7/lib-dynload
  /usr/local/lib/python2.7/lib-dynload/namebench
  /usr/local/lib/python2.7/lib-old
  /usr/local/lib/python2.7/lib-old/namebench
  /usr/local/lib/python2.7/lib-tk
  /usr/local/lib/python2.7/lib-tk/namebench
  /usr/local/lib/python2.7/plat-freebsd8
  /usr/local/lib/python2.7/plat-freebsd8/namebench
  /usr/local/lib/python2.7
  /usr/local/lib/python2.7/namebench
  /usr/local/lib/python27.zip
  /usr/local/lib/python27.zip/namebench
  /usr/local/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg
  /usr/local/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg/namebench
  /usr/local/lib/python2.7/site-packages/MarkupSafe-0.15-py2.7-freebsd-8.2-RELEASE-i386.egg
  /usr/local/lib/python2.7/site-packages/MarkupSafe-0.15-py2.7-freebsd-8.2-RELEASE-i386.egg/namebench
  /usr/local/lib/python2.7/site-packages/simplejson-2.1.6-py2.7-freebsd-8.2-RELEASE-i386.egg
  /usr/local/lib/python2.7/site-packages/simplejson-2.1.6-py2.7-freebsd-8.2-RELEASE-i386.egg/namebench
  /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
  /usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/namebench
  /usr/local/bin
  /usr/local/bin/namebench
Traceback (most recent call last):
  File "/usr/local/bin/namebench.py", line 38, in <module>
    (options, supplied_ns, global_ns, regional_ns) = config.GetConfiguration()
  File "/usr/local/lib/python2.7/site-packages/libnamebench/config.py", line 40, in GetConfiguration
    (configured_options, global_ns, regional_ns) = ProcessConfigurationFile(options)
  File "/usr/local/lib/python2.7/site-packages/libnamebench/config.py", line 169, in ProcessConfigurationFile
    raise ValueError('Could not find usable configuration in %s (%s)' % (full_path, options.config))
ValueError: Could not find usable configuration in config/namebench.cfg 
(config/namebench.cfg)

What version of the product are you using? On what operating system?
1.3.1, FreeBSD

Please provide any additional information below.
With patch provided, results are clean (data and configuration are properly 
picked up in /usr/local/share/namebench:

namebench.py -x
namebench 1.3.1 - best source (automatic) on 2011-08-16 09:24:02.732502
threads=40/2 queries=250 runs=1 timeout=3.5 health_timeout=3.75 servers=11
------------------------------------------------------------------------------
- Reading Top 2,000 Websites (Alexa): 
/usr/local/share/namebench/data/alexa-top-2000-domains.txt (0.7MB)
- Reading Cache Latency Test (100% hit): 
/usr/local/share/namebench/data/cache-hit.txt (0.1MB)
- Reading Cache Latency Test (100% miss): 
/usr/local/share/namebench/data/cache-miss.txt (0.1MB)
- Reading Cache Latency Test (50% hit, 50% miss): 
/usr/local/share/namebench/data/cache-mix.txt (0.1MB)
- Reading Chromium: /home/jhelfman/.config/chromium/Default/History (2.8MB)
- Reading Mozilla Firefox: 
/home/jhelfman/.mozilla/firefox/q4h59vbe.default/places.sqlite (10.0MB)
- Generating tests from Chromium (7444 records, selecting 250 automatic)
- Selecting 250 out of 2995 sanitized records (random mode).

Original issue reported on code.google.com by jason.he...@gmail.com on 16 Aug 2011 at 4:25

Attachments:

GoogleCodeExporter commented 8 years ago
I'm going to replicate this patch in a way that will be easier for Thomas to 
pull in.

Original comment by awar...@google.com on 26 Jun 2012 at 11:28