Skip to contentSkip to conversation

httping: new package

PATCH New gilles.talis at gmail.com 2 participants 2 messages Jan 14, 2013 – Jan 15, 2013

lore
Share & tools
lore
#0 lore raw

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)

---
 package/Config.in                             |    1 +
 package/httping/Config.in                     |   23 +++++++++++
 package/httping/httping-override-cflags.patch |   53 +++++++++++++++++++++++++
 package/httping/httping.mk                    |   37 +++++++++++++++++
 4 files changed, 114 insertions(+), 0 deletions(-)
 create mode 100644 package/httping/Config.in
 create mode 100644 package/httping/httping-override-cflags.patch
 create mode 100644 package/httping/httping.mk
package/Config.in +1 -0
index 42cde07..c59f342 100644
@@ -631,6 +631,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 +23 -0
new file mode 100644
index 0000000..aa1550a
@@ -0,0 +1,23 @@
+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"
+       select BR2_PACKAGE_OPENSSL
+       help
+         Adds openSSL support to httping
+
+config BR2_PACKAGE_HTTPING_TFO
+       bool "TCP Fast Open (TFO) support"
+
+endif
package/httping/httping-override-cflags.patch new file +53 -0

53 lines not on this page · raw message

package/httping/httping.mk new file +37 -0
new file mode 100644
index 0000000..bec65f3
@@ -0,0 +1,37 @@
+#############################################################
+#
+# httping
+#
+#############################################################
+HTTPING_VERSION = 1.5.7
+HTTPING_SOURCE = httping-$(HTTPING_VERSION).tgz
+HTTPING_SITE = http://www.vanheusden.com/httping
+HTTPING_LICENSE = GPLv2
+HTTPING_LICENSE_FILES = license.txt
+
+ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y)
+       HTTPING_DEPENDENCIES = openssl
+else
+       HTTPING_SSL = no
+endif
+
+ifeq ($(BR2_PACKAGE_HTTPING_TFO),y)
+       HTTPING_TFO = yes
+endif
+
+define HTTPING_BUILD_CMDS
+       $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+               SSL=$(HTTPING_SSL) \
+               DEBUG=no \
+               TFO=$(HTTPING_TFO) -C $(@D)
+endef
+
+define HTTPING_INSTALL_TARGET_CMDS
+       $(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin/httping
+endef
+
+define HTTPING_CLEAN_CMDS
+       $(MAKE) -C $(@D) clean
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 httping: new package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"gilles" == gilles talis <[email protected]> writes:

gilles> From: Gilles Talis <[email protected]>
gilles> Httping is like 'ping' but for http-requests. gilles> Give it an url, and it'll show you how long it takes to connect, gilles> send a request and retrieve the reply (only the headers)

Thanks, committed with minor changes (see below).

gilles> +++ b/package/httping/Config.in
gilles> @@ -0,0 +1,23 @@
gilles> +config BR2_PACKAGE_HTTPING
gilles> + bool "httping"
gilles> + help

 gilles> +         Httping is like 'ping' but for http-requests.
 gilles> +         Give it an url, and it'll show you how long it takes to connect,
 gilles> +         send a request and retrieve the reply (only the headers).
 gilles> +         Be aware that the transmission across the network also takes time!
 gilles> +         So it measures the latency of the webserver + network.
 gilles> +
 gilles> +         http://www.vanheusden.com/httping/
 gilles> +
 gilles> +if BR2_PACKAGE_HTTPING
 gilles> +
 gilles> +config BR2_PACKAGE_HTTPING_OPENSSL
 gilles> +       bool "OpenSSL support"
 gilles> +       select BR2_PACKAGE_OPENSSL
 gilles> +       help

gilles> + Adds openSSL support to httping

We normally automatically add openssl support if the openssl package is enabled, so I've dropped this option.

gilles> +
gilles> +config BR2_PACKAGE_HTTPING_TFO
gilles> + bool "TCP Fast Open (TFO) support"

The TFO option seems to add very little overhead, so I think we could have just always enabled it, but OK.

gilles> +++ b/package/httping/httping.mk
gilles> @@ -0,0 +1,37 @@
gilles> +############################################################# gilles> +#
gilles> +# httping
gilles> +#
gilles> +############################################################# gilles> +HTTPING_VERSION = 1.5.7

We normally have an empty line before _VERSION.

gilles> +HTTPING_SOURCE = httping-$(HTTPING_VERSION).tgz gilles> +HTTPING_SITE = http://www.vanheusden.com/httping
gilles> +HTTPING_LICENSE = GPLv2
gilles> +HTTPING_LICENSE_FILES = license.txt gilles> +
gilles> +ifeq ($(BR2_PACKAGE_HTTPING_OPENSSL),y)
gilles> + HTTPING_DEPENDENCIES = openssl
gilles> +else
gilles> + HTTPING_SSL = no
gilles> +endif

gilles> +
gilles> +ifeq ($(BR2_PACKAGE_HTTPING_TFO),y)
gilles> + HTTPING_TFO = yes
gilles> +endif
gilles> +
gilles> +define HTTPING_BUILD_CMDS
gilles> + $(MAKE) $(TARGET_CONFIGURE_OPTS) \

 gilles> +               SSL=$(HTTPING_SSL) \
 gilles> +               DEBUG=no \
 gilles> +               TFO=$(HTTPING_TFO) -C $(@D)

gilles> +endef

We normally indent the lines inside defines with <tabs> to be consistent with make rules. I've cleaned this up a bit while changing the openssl handling.

gilles> +
gilles> +define HTTPING_INSTALL_TARGET_CMDS
gilles> + $(INSTALL) -D -m 0755 $(@D)/httping $(TARGET_DIR)/usr/bin/httping

Upstream has a working 'make install', so I changed it to use that instead.

Signature · 1 line
Bye, Peter Korsgaard