Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Tomb01

macrumors 6502
Original poster
Jan 6, 2009
482
49
Colleyville, TX
there was a utility that analyzed dns performance called namebench. Sadly it is only 32 bit, so does not work on Catalina. Is anyone aware of something that replaces it? thanks in advance.
 

HDFan

Contributor
Jun 30, 2007
7,213
3,263
NAMEinator DNS Benchmark tool (namebench successor) https://github.com/mwiora/NAMEinator
Works from Terminal in Catalina.

Couldn't get it work.

Instructions say:

go get github.com/miekg/dns
cd ~/go/src/github.com/mwiora/NAMEinator/

After running the get command mwiora/NAMEinator directory doesn't exist. miekg/dns does.

go build works there, but no executable called NAMEinator is created.
 

bogdanw

macrumors 603
Mar 10, 2009
6,019
2,946
The steps are:
1. install Go (macOS package installer from https://golang.org/doc/install)
2. go get github.com/mwiora/NAMEinator
3. go get github.com/miekg/dns
4. cd ~/go/src/github.com/mwiora/NAMEinator/
5. go build
6. ./NAMEinator
The folder structure
go.jpg

Results
NAMEinator.jpg
 
  • Like
Reactions: HDFan

bogdanw

macrumors 603
Mar 10, 2009
6,019
2,946
That worked. Thanks!
If you got it working, here is an AppleScript that can be saved as an app to run NAMEinator without opening Terminal:
Code:
display dialog "Running NAMEinator, please wait" giving up after 5
set DNSResults to do shell script "cd ~/go/src/github.com/mwiora/NAMEinator/; ./NAMEinator"
display dialog DNSResults buttons {"Close"} default button 1
The first dialog window closes after 5 seconds, the execution continues in the background and then it displays results like this:
NAMEinatorApp.jpg
 

HDFan

Contributor
Jun 30, 2007
7,213
3,263

bogdanw

macrumors 603
Mar 10, 2009
6,019
2,946
There might be a way of running 1.3.1 with a GUI. The Python version of NAMEinator can be run in Catalina like this
Code:
git clone --single-branch --branch namebench_python_1.3.1_freeze https://github.com/mwiora/NAMEinator
cd NAMEinator
./namebench.py
I don't quite understand what beeuhtricks has done:" I managed to get a gui by commenting out the mac platform checks and hardcoding the launch, by the way."
https://github.com/mwiora/NAMEinator/issues/11
 

casperes1996

macrumors 604
Jan 26, 2014
7,576
5,753
Horsens, Denmark
There might be a way of running 1.3.1 with a GUI. The Python version of NAMEinator can be run in Catalina like this
Code:
git clone --single-branch --branch namebench_python_1.3.1_freeze https://github.com/mwiora/NAMEinator
cd NAMEinator
./namebench.py
I don't quite understand what beeuhtricks has done:" I managed to get a gui by commenting out the mac platform checks and hardcoding the launch, by the way."
https://github.com/mwiora/NAMEinator/issues/11

As per the request of bogdanw, I had a look at this - The Python version of Namebench can be made to work with a GUI on later releases of macOS. I cloned the GitHub repo, and opened the Xcode project from the cocoa folder (You must be on the Python branch, I have not looked at the Go branch).
Set all compiler flags and build targets to a more recent version of macOS; I set it all to 10.13, but you can choose for yourself. This is setting a minimum build target, and anything relatively recent should work on all new releases.
Open the .xib file, and select the window it shows and set its build target to be the same as you set for the project. Build the app. If you get no errors, yay. The app likely still won't open though; It didn't for me at least. For me the app bundle wasn't quite good enough at packaging together what it needed. - Open the products pane in Xcode, and reveal the .app bundle in the Finder. Place it somewhere nice. Open up the package and go to its Resources, and just chug in all the stuff from the Namebench folder.
Now it should open.

If all of that sounds like a bloody hassle; I can send to you a "finished" .app. But I make no guarantees about it. I have performed no testing, I have no extensive knowledge of Namebench - I just quickly looked at it, and got the GUI up for it - Namebench is not my code, I just messed with it to get the GUI up.

And yes, it works in Catalina :)
 
  • Like
Reactions: nmeed and bogdanw

nmeed

macrumors 6502a
Dec 1, 2014
543
212
As per the request of bogdanw, I had a look at this - The Python version of Namebench can be made to work with a GUI on later releases of macOS. I cloned the GitHub repo, and opened the Xcode project from the cocoa folder (You must be on the Python branch, I have not looked at the Go branch).
Set all compiler flags and build targets to a more recent version of macOS; I set it all to 10.13, but you can choose for yourself. This is setting a minimum build target, and anything relatively recent should work on all new releases.
Open the .xib file, and select the window it shows and set its build target to be the same as you set for the project. Build the app. If you get no errors, yay. The app likely still won't open though; It didn't for me at least. For me the app bundle wasn't quite good enough at packaging together what it needed. - Open the products pane in Xcode, and reveal the .app bundle in the Finder. Place it somewhere nice. Open up the package and go to its Resources, and just chug in all the stuff from the Namebench folder.
Now it should open.

If all of that sounds like a bloody hassle; I can send to you a "finished" .app. But I make no guarantees about it. I have performed no testing, I have no extensive knowledge of Namebench - I just quickly looked at it, and got the GUI up for it - Namebench is not my code, I just messed with it to get the GUI up.

And yes, it works in Catalina :)

if you could send me it that would be great! Thank you!
 

bogdanw

macrumors 603
Mar 10, 2009
6,019
2,946
casperes1996 was kind to test and confirm that it’s working, but let’s not get him in trouble with Apple :) The app can not respect the requirements for Catalina (notarization and so on) and might end up being flagged as suspect.

Having tested the GUI app, my impression is that is not that great. It just says: “8.8.8.8 is the fastest”, without any details. If you are interested in the real speed, the command line version is better.

On a related topic, I’ve posted scripts for using DNS over HTTPS here
https://github.com/b0gdanw/cloudflared-macos
https://github.com/b0gdanw/dnscrypt-proxy-macos
and DNS over TLS can be easily set up with Stubby GUI for macOS https://dnsprivacy.org/wiki/display/DP/Stubby+GUI+for+macOS
 

casperes1996

macrumors 604
Jan 26, 2014
7,576
5,753
Horsens, Denmark
if you could send me it that would be great! Thank you!

You can get it from my server here
Namebench.zip

casperes1996 was kind to test and confirm that it’s working, but let’s not get him in trouble with Apple :) The app can not respect the requirements for Catalina (notarization and so on) and might end up being flagged as suspect.

Having tested the GUI app, my impression is that is not that great. It just says: “8.8.8.8 is the fastest”, without any details. If you are interested in the real speed, the command line version is better.

On a related topic, I’ve posted scripts for using DNS over HTTPS here
https://github.com/b0gdanw/cloudflared-macos
https://github.com/b0gdanw/dnscrypt-proxy-macos
and DNS over TLS can be easily set up with Stubby GUI for macOS https://dnsprivacy.org/wiki/display/DP/Stubby+GUI+for+macOS

No need to worry. No trouble with Apple. This is all above board. If one had an Apple developer license I also foresee no issues getting it notarised. Of course it isn't, but as you showed yourself you can still run it. While defaults air on the side of caution the user is still in control on macOS, and Apple has no interest in limiting these sorts of things as far as I can tell.
 

Jassbag

macrumors newbie
Dec 27, 2017
23
6
Athens
You can get it from my server here
Namebench.zip

Thank you so much @casperes1996 ! Really appreciate this

Having tested the GUI app, my impression is that is not that great. It just says: “8.8.8.8 is the fastest”, without any details. If you are interested in the real speed, the command line version is better.

It's the same as the original namebench. It creates a .csv & .html files with detailed results. The difference is that in this "recompiled" version the html file doesn't open automatically after finishing.

You can find the generated .html file here:

private/var/folders/<two_random_characaters>/<many_random_characters>/T/namebench-<date>.html
 

casperes1996

macrumors 604
Jan 26, 2014
7,576
5,753
Horsens, Denmark
Thank you so much @casperes1996 ! Really appreciate this



It's the same as the original namebench. It creates a .csv & .html files with detailed results. The difference is that in this "recompiled" version the html file doesn't open automatically after finishing.

You can find the generated .html file here:

private/var/folders/<two_random_characaters>/<many_random_characters>/T/namebench-<date>.html

You're very welcome :) - A long time since I did this now, but I think the bundle is still on my server in case anyone's reading this, but it won't necessarily stay there forever :)


Oh and in terms of opening the file automatically; I only had a slight glance at the main Python code, and primarily looked at the macOS specific GUI parts, but the source files I think I left inside the app bundle to not breach the license for the software while distributing it so informally, so you can probably fairly easily adapt it to open the file
 
  • Like
Reactions: Jassbag

QuarterSwede

macrumors G3
Oct 1, 2005
9,863
2,134
Colorado Springs, CO
You can get it from my server here
Namebench.zip



No need to worry. No trouble with Apple. This is all above board. If one had an Apple developer license I also foresee no issues getting it notarised. Of course it isn't, but as you showed yourself you can still run it. While defaults air on the side of caution the user is still in control on macOS, and Apple has no interest in limiting these sorts of things as far as I can tell.
Just in case anyone is wondering, this works on Big Sur 11.2.3 as well. If you're still tweaking it, a feature request would be give a list telling the user what the top 5-10 fastest servers are instead of just showing the one fastest.

Anyway, apps works well enough to give me what I wanted. Thanks for sharing!
 

casperes1996

macrumors 604
Jan 26, 2014
7,576
5,753
Horsens, Denmark
Just in case anyone is wondering, this works on Big Sur 11.2.3 as well. If you're still tweaking it, a feature request would be give a list telling the user what the top 5-10 fastest servers are instead of just showing the one fastest.

Anyway, apps works well enough to give me what I wanted. Thanks for sharing!
I haven't touched it since I made that post. I'd love to see about adding the feature requested, but unfortunately I'm rather busy lately working on an operating system for my bachelor project. I may do it eventually, but have no immediate plans for it :). - That said, the command line version should be able to offer that until then if one is prepared to use the CLI :)
Thanks for your post. Appreciate both the feature request and testing it on 11.2.3
 

Johnny Jackhammer

macrumors regular
May 5, 2011
129
82
Not sure if you noted, but HomeBrew offers a text version of namebench 1-3-1 and works on Catalina.

1. Install xcode : xcode-select --install
2. Download and deploy brew : /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
3. Install namebench : brew install namebench

I can also suggest install : tcping, udpping, ncftp and wget ;)
I have homebrew installed so thought I would give that a shot first...

brew install namebench

namebench File "/usr/local/Cellar/namebench/1.3.1/libexec/bin/namebench", line 28 print '* Your Python version (%s) is too old! Please upgrade to 2.6+!' % your_version ^ SyntaxError: invalid syntax

which python /usr/local/opt/python@3.9/libexec/bin/python
 

casperes1996

macrumors 604
Jan 26, 2014
7,576
5,753
Horsens, Denmark
I have homebrew installed so thought I would give that a shot first...

brew install namebench

namebench File "/usr/local/Cellar/namebench/1.3.1/libexec/bin/namebench", line 28 print '* Your Python version (%s) is too old! Please upgrade to 2.6+!' % your_version ^ SyntaxError: invalid syntax

which python /usr/local/opt/python@3.9/libexec/bin/python

You point out your own problem. Namebench expects Python2.6+. Python3.x is basically a different language.
You're going to want, for Namebench, a Python2.x where x is >=6 as the first one in your path.
 

fran010180

macrumors newbie
Feb 16, 2011
20
0
The steps are:
1. install Go (macOS package installer from https://golang.org/doc/install)
2. go get github.com/mwiora/NAMEinator
3. go get github.com/miekg/dns
4. cd ~/go/src/github.com/mwiora/NAMEinator/
5. go build
6. ./NAMEinator
The folder structure

Results

had to change the path to
cd ~/go/pkg/mod/github.com/mwiora/NAMEinator
because I had no /src folder but only pkg

However after go build command I got an error message
go build
go: downloading github.com/miekg/dns v1.1.31
go: downloading golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: downloading golang.org/x/net v0.0.0-20190923162816-aa69164e4478
go: downloading golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe
go build NAMEinator: copying /var/folders/41/5znrgxzs1mlc0kqy4fgr3b600000gn/T/go-build270837004/b001/exe/a.out: open NAMEinator: permission denied


failed. Too complicated for me vs the easiness of namebench
 
Last edited:

Johnny Jackhammer

macrumors regular
May 5, 2011
129
82
The steps are:
1. install Go (macOS package installer from https://golang.org/doc/install)
2. go get github.com/mwiora/NAMEinator
3. go get github.com/miekg/dns
4. cd ~/go/src/github.com/mwiora/NAMEinator/
5. go build
6. ./NAMEinator
Something has changed since 2020?

I am using `zsh` and not `bash`.

Obviously the name of the directory should be"NAMEinator" and not "!n!a!m!einator". Looks like go is interpreting capital letters incorrectly on macOS. Not sure I feel comfortable building this software if this is the case.

12/26/21_13:30:58 /Users/john 0-zsh% go version go version go1.17.5 darwin/amd64 12/26/21_13:31:08 /Users/john 0-zsh% go get github.com/mwiora/NAMEinator go: downloading github.com/mwiora/NAMEinator v0.0.6 go get: github.com/mwiora/NAMEinator@v0.0.6: parsing go.mod: module declares its path as: NAMEinator but was required as: github.com/mwiora/NAMEinator 12/26/21_13:31:28 /Users/john 1-zsh% go get github.com/miekg/dns go: downloading github.com/miekg/dns v1.1.45 go: downloading golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 go: downloading golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c go: downloading golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2 go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 go: downloading golang.org/x/mod v0.4.2 12/26/21_13:32:56 /Users/john 0-zsh% cd ~/go/src/github.com/mwiora/NAMEinator/ cd: no such file or directory: /Users/john/go/src/github.com/mwiora/NAMEinator/

Using these directions I ended up with this file structure.

12/26/21_13:38:09 /Users/john/go/pkg 0-zsh% tree . . ├── mod │ ├── cache │ │ └── download │ │ ├── github.com │ │ │ ├── miekg │ │ │ │ └── dns │ │ │ │ └── @v │ │ │ │ ├── list │ │ │ │ ├── v1.1.45.info │ │ │ │ ├── v1.1.45.lock │ │ │ │ ├── v1.1.45.mod │ │ │ │ ├── v1.1.45.zip │ │ │ │ └── v1.1.45.ziphash │ │ │ ├── mwiora │ │ │ │ └── !n!a!m!einator │ │ │ │ └── @v │ │ │ │ ├── list │ │ │ │ ├── v0.0.6.info │ │ │ │ ├── v0.0.6.lock │ │ │ │ ├── v0.0.6.mod │ │ │ │ ├── v0.0.6.zip │ │ │ │ └── v0.0.6.ziphash │ │ │ └── yuin │ │ │ └── goldmark │ │ │ └── @v │ │ │ ├── list │ │ │ └── v1.3.5.mod ...

ADDENDUM:
Solution is https://github.com/mrwiora/NAMEinator/issues/46#issuecomment-789247422
 
Last edited:

Johnny Jackhammer

macrumors regular
May 5, 2011
129
82
@fran010180

Follow directions here and it's a breeze. I had similar issues but this resolves them and it built without issue.


first install go: https://golang.org/doc/install


mkdir -p /Users/yourusername/go/1.17.5/src/github.com/mwiora/NAMEinator cd /Users/yourusername/go/1.17.5/src/github.com/mwiora/ git clone https://github.com/mwiora/NAMEinator.git cd NAMEinator go build ./NAMEinator
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.