httping: new package
PATCH 1/1 httping: new package
From: Gilles Talis <[email protected]>
Httping is like 'ping' but for http-requests.
Give it an url, and it'll show you how long it takes to connect, send a request and retrieve the reply (only the headers). Be aware that the transmission across the network also takes time! So it measures the latency of the webserver + network.
http://www.vanheusden.com/httping/
--- package/Config.in | 1 + package/httping/Config.in | 24 ++++++++++++++++++++++++ package/httping/httping.mk | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 package/httping/Config.in create mode 100644 package/httping/httping.mk
package/Config.in +1 -0
@@ -617,6 +617,7 @@ source "package/ethtool/Config.in" source "package/heirloom-mailx/Config.in" source "package/hiawatha/Config.in" source "package/hostapd/Config.in" +source "package/httping/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/ifplugd/Config.in" endif
package/httping/Config.in new file +24 -0
@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HTTPING + bool "httping" + help + Httping is like 'ping' but for http-requests. + Give it an url, and it'll show you how long it takes to connect, + send a request and retrieve the reply (only the headers). + Be aware that the transmission across the network also takes time! + So it measures the latency of the webserver + network. + + http://www.vanheusden.com/httping/ + +if BR2_PACKAGE_HTTPING + +config BR2_PACKAGE_HTTPING_OPENSSL + bool "OpenSSL support" + default y + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_HTTPING_TFO + bool "TCP Fast Open (TFO) support" + default n + +endif +
package/httping/httping.mk new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 1/1 httping: new package
Dear gilles.talis at gmail.com,
Thanks for your contribution! Your package mostly looks good, but I (of course!) have a few comments. See below.
Quoted 6 lines · gilles.talis at gmail.com
package/httping/Config.in new file +0
-0
package/httping/Config.in line 8
Quoted 8 lines
package/httping/Config.in new file +8
-0@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HTTPING + bool "httping" + help + Httping is like 'ping' but for http-requests. + Give it an url, and it'll show you how long it takes to connect, + send a request and retrieve the reply (only the headers). + Be aware that the transmission across the network also takes time! + So it measures the latency of the webserver + network.
Indentation of this line is not correct: it is composed of spaces only, while it should be one tab + 2 spaces like the other lines.
package/httping/Config.in line 17
Quoted 6 lines
package/httping/Config.in new file +6
-0+if BR2_PACKAGE_HTTPING + +config BR2_PACKAGE_HTTPING_OPENSSL + bool "OpenSSL support" + default y + select BR2_PACKAGE_OPENSSL
Here there is a point that is rather unclear in Buildroot:
*) Should each package offer a configuration sub-option to enable
features that depend on other packages (like you did on OpenSSL)
*) Or should a package automatically enable features if it finds that
the dependencies are available? This is generally what we do for packages having an optional dependency on OpenSSL.
This is to be discussed with other Buildroot developers. Probably we need to clarify what the rule is, and then document it.
package/httping/Config.in line 21
Quoted 3 lines
package/httping/Config.in new file +3
-0+config BR2_PACKAGE_HTTPING_TFO + bool "TCP Fast Open (TFO) support" + default n
'default n' is the default, so it's not needed.
package/httping/httping.mk line 9
Quoted 12 lines
package/httping/httping.mk new file +9
-0@@ -0,0 +1,44 @@ +############################################################# +# +# httping +# +############################################################# +HTTPING_VERSION = 1.5.6 +HTTPING_SOURCE = httping-$(HTTPING_VERSION).tgz +HTTPING_SITE = http://www.vanheusden.com/httping +HTTPING_LICENSE = GPL
You should be more specific about the version, and whether the "or later" specifier is here or not. Good choices are: GPLv2, GPLv2+, GPLv3, GPLv3+.
package/httping/httping.mk line 19
Quoted 10 lines
package/httping/httping.mk new file +10
-0+HTTPING_LICENSE_FILES = license.txt + +ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y) +HTTPING_DEPENDENCIES = openssl +endif + + +ifneq ($(BR2_PACKAGE_HTTPING_OPENSSL),y) + HTTPING_SSL = no +endif
This should be slightly changed to something like:
ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y)
HTTPING_DEPENDENCIES += openssl HTTPING_SSL = yes
else
HTTPING_SSL = no
endif
(assuming SSL=yes is correct to enable SSL support)
package/httping/httping.mk line 32
Quoted 12 lines
package/httping/httping.mk new file +12
-0+ifeq ($(BR2_PACKAGE_HTTPING_TFO),y) + HTTPING_TFO = yes +endif + +define HTTPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" \ + SSL=$(HTTPING_SSL) \ + DEBUG=no \ + TFO=$(HTTPING_TFO) \ + LD="$(TARGET_LD)" \ + STRIP="$(TARGET_STRIP)" -C $(@D) +endef
Here, I would recommend using $(TARGET_CONFIGURE_OPTS) :
$(MAKE) $(TARGET_CONFIGURE_OPTS) \ SSL=$(HTTPING_SSL) \ DEBUG=no \ TFO=$(HTTPING_TFO) \ -C $(@D)
package/httping/httping.mk line 36
Quoted 3 lines
package/httping/httping.mk new file +3
-0+define HTTPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin +endef
With -D, you should give a complete path to the target binary:
$(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin/httping
package/httping/httping.mk line 44
Quoted 7 lines
package/httping/httping.mk new file +7
-0+define HTTPING_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) + +# http://www.vanheusden.com/httping/httping-1.5.6.tgz
This comment is not needed.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 httping: new package
Dear Thomas,
Thanks a lot for your comments, I am going to fix these issues right away! It is amazing how much you can learn from code reviews :-). Best regards,
Gilles
Quoted 128 lines · Thomas Petazzoni
Dear gilles.talis at gmail.com,
Thanks for your contribution! Your package mostly looks good, but I (of course!) have a few comments. See below.
package/httping/Config.in line 7
Quoted 13 lines · gilles.talis at gmail.com
package/httping/Config.in new file +7
-0@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HTTPING + bool "httping" + help + Httping is like 'ping' but for http-requests. + Give it an url, and it'll show you how long it takes to connect, + send a request and retrieve the reply (only the headers). + Be aware that the transmission across the network also takestime!
package/httping/Config.in line 8
Quoted 1 line
package/httping/Config.in new file +1
-0+ So it measures the latency of the webserver + network.Indentation of this line is not correct: it is composed of spaces only, while it should be one tab + 2 spaces like the other lines.
package/httping/Config.in line 17
Quoted 6 lines
package/httping/Config.in new file +6
-0+if BR2_PACKAGE_HTTPING + +config BR2_PACKAGE_HTTPING_OPENSSL + bool "OpenSSL support" + default y + select BR2_PACKAGE_OPENSSLHere there is a point that is rather unclear in Buildroot:
*) Should each package offer a configuration sub-option to enable
features that depend on other packages (like you did on OpenSSL)*) Or should a package automatically enable features if it finds that
the dependencies are available? This is generally what we do for packages having an optional dependency on OpenSSL.This is to be discussed with other Buildroot developers. Probably we need to clarify what the rule is, and then document it.
package/httping/Config.in line 21
Quoted 3 lines
package/httping/Config.in new file +3
-0+config BR2_PACKAGE_HTTPING_TFO + bool "TCP Fast Open (TFO) support" + default n'default n' is the default, so it's not needed.
package/httping/httping.mk line 9
Quoted 12 lines
package/httping/httping.mk new file +9
-0@@ -0,0 +1,44 @@ +############################################################# +# +# httping +# +############################################################# +HTTPING_VERSION = 1.5.6 +HTTPING_SOURCE = httping-$(HTTPING_VERSION).tgz +HTTPING_SITE = http://www.vanheusden.com/httping +HTTPING_LICENSE = GPLYou should be more specific about the version, and whether the "or later" specifier is here or not. Good choices are: GPLv2, GPLv2+, GPLv3, GPLv3+.
package/httping/httping.mk line 19
Quoted 10 lines
package/httping/httping.mk new file +10
-0+HTTPING_LICENSE_FILES = license.txt + +ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y) +HTTPING_DEPENDENCIES = openssl +endif + + +ifneq ($(BR2_PACKAGE_HTTPING_OPENSSL),y) + HTTPING_SSL = no +endifThis should be slightly changed to something like:
ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y)
HTTPING_DEPENDENCIES+= openssl
HTTPING_SSL= yes
else
HTTPING_SSL= no
endif(assuming SSL=yes is correct to enable SSL support)
package/httping/httping.mk line 32
Quoted 12 lines
package/httping/httping.mk new file +12
-0+ifeq ($(BR2_PACKAGE_HTTPING_TFO),y) + HTTPING_TFO = yes +endif + +define HTTPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" \ + SSL=$(HTTPING_SSL) \ + DEBUG=no \ + TFO=$(HTTPING_TFO) \ + LD="$(TARGET_LD)" \ + STRIP="$(TARGET_STRIP)" -C $(@D) +endefHere, I would recommend using $(TARGET_CONFIGURE_OPTS) :
$(MAKE) $(TARGET_CONFIGURE_OPTS) \ SSL=$(HTTPING_SSL) \ DEBUG=no \ TFO=$(HTTPING_TFO) \ -C $(@D)package/httping/httping.mk line 36
Quoted 3 lines
package/httping/httping.mk new file +3
-0+define HTTPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin +endefWith -D, you should give a complete path to the target binary:
$(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin/httpingpackage/httping/httping.mk line 44
Quoted 7 lines
package/httping/httping.mk new file +7
-0+define HTTPING_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) + +# http://www.vanheusden.com/httping/httping-1.5.6.tgzThis comment is not needed.
Quoted 9 lines
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130112/7eff6bf2/attachment.html>
PATCH 1/1 httping: new package
In reply to Thomas PetazzoniDear Thomas,
Thanks again for your comments.
There's one recommendation I could not follow though. Using $(TARGET_CONFIGURE_OPTS) instead of "CC=..." and "LD..." seems to dismiss the "SSL=" and "TFO=" options. I will have to spend more time to figure out why this happens.
I have kept the build command that way for the time being.
best regards
Gilles.
Quoted 128 lines · Thomas Petazzoni
Dear gilles.talis at gmail.com,
Thanks for your contribution! Your package mostly looks good, but I (of course!) have a few comments. See below.
package/httping/Config.in line 7
Quoted 13 lines · gilles.talis at gmail.com
package/httping/Config.in new file +7
-0@@ -0,0 +1,24 @@ +config BR2_PACKAGE_HTTPING + bool "httping" + help + Httping is like 'ping' but for http-requests. + Give it an url, and it'll show you how long it takes to connect, + send a request and retrieve the reply (only the headers). + Be aware that the transmission across the network also takestime!
package/httping/Config.in line 8
Quoted 1 line
package/httping/Config.in new file +1
-0+ So it measures the latency of the webserver + network.Indentation of this line is not correct: it is composed of spaces only, while it should be one tab + 2 spaces like the other lines.
package/httping/Config.in line 17
Quoted 6 lines
package/httping/Config.in new file +6
-0+if BR2_PACKAGE_HTTPING + +config BR2_PACKAGE_HTTPING_OPENSSL + bool "OpenSSL support" + default y + select BR2_PACKAGE_OPENSSLHere there is a point that is rather unclear in Buildroot:
*) Should each package offer a configuration sub-option to enable
features that depend on other packages (like you did on OpenSSL)*) Or should a package automatically enable features if it finds that
the dependencies are available? This is generally what we do for packages having an optional dependency on OpenSSL.This is to be discussed with other Buildroot developers. Probably we need to clarify what the rule is, and then document it.
package/httping/Config.in line 21
Quoted 3 lines
package/httping/Config.in new file +3
-0+config BR2_PACKAGE_HTTPING_TFO + bool "TCP Fast Open (TFO) support" + default n'default n' is the default, so it's not needed.
package/httping/httping.mk line 9
Quoted 12 lines
package/httping/httping.mk new file +9
-0@@ -0,0 +1,44 @@ +############################################################# +# +# httping +# +############################################################# +HTTPING_VERSION = 1.5.6 +HTTPING_SOURCE = httping-$(HTTPING_VERSION).tgz +HTTPING_SITE = http://www.vanheusden.com/httping +HTTPING_LICENSE = GPLYou should be more specific about the version, and whether the "or later" specifier is here or not. Good choices are: GPLv2, GPLv2+, GPLv3, GPLv3+.
package/httping/httping.mk line 19
Quoted 10 lines
package/httping/httping.mk new file +10
-0+HTTPING_LICENSE_FILES = license.txt + +ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y) +HTTPING_DEPENDENCIES = openssl +endif + + +ifneq ($(BR2_PACKAGE_HTTPING_OPENSSL),y) + HTTPING_SSL = no +endifThis should be slightly changed to something like:
ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y)
HTTPING_DEPENDENCIES+= openssl
HTTPING_SSL= yes
else
HTTPING_SSL= no
endif(assuming SSL=yes is correct to enable SSL support)
package/httping/httping.mk line 32
Quoted 12 lines
package/httping/httping.mk new file +12
-0+ifeq ($(BR2_PACKAGE_HTTPING_TFO),y) + HTTPING_TFO = yes +endif + +define HTTPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" \ + SSL=$(HTTPING_SSL) \ + DEBUG=no \ + TFO=$(HTTPING_TFO) \ + LD="$(TARGET_LD)" \ + STRIP="$(TARGET_STRIP)" -C $(@D) +endefHere, I would recommend using $(TARGET_CONFIGURE_OPTS) :
$(MAKE) $(TARGET_CONFIGURE_OPTS) \ SSL=$(HTTPING_SSL) \ DEBUG=no \ TFO=$(HTTPING_TFO) \ -C $(@D)package/httping/httping.mk line 36
Quoted 3 lines
package/httping/httping.mk new file +3
-0+define HTTPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin +endefWith -D, you should give a complete path to the target binary:
$(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin/httpingpackage/httping/httping.mk line 44
Quoted 7 lines
package/httping/httping.mk new file +7
-0+define HTTPING_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(generic-package)) + +# http://www.vanheusden.com/httping/httping-1.5.6.tgzThis comment is not needed.
Quoted 9 lines
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130112/2f3d69cc/attachment-0001.html>
PATCH 1/1 httping: new package
In reply to Thomas PetazzoniQuoted 9 lines · Thomas Petazzoni
Quoted 4 lines
Quoted 4 lines
+config
BR2_PACKAGE_HTTPING_OPENSSL
+ bool "OpenSSL support"
+ default y
+ selectBR2_PACKAGE_OPENSSLHere there is a point that is rather unclear in Buildroot:
*) Should each package offer a configuration sub-option to enable
features that depend on other packages (like you did on OpenSSL)
Quoted 6 lines
*) Or should a package automatically enable features if it finds that
the dependencies are available? This is generally what we do for packages having an optional dependency on OpenSSL.This is to be discussed with other Buildroot developers. Probably we need to clarify what the rule is, and then document it.
+1 on the "needs to be documented".
But for me the rule is fairly clear: if it doesn't significantly
increase binary size, then it should be selected automatically if available.
It would be good to add to the package's help text that "SSL support is
available if the openssl package (in the Libraries -> Crypto menu) is selected."
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F