summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-benchmarks/wrk')
-rw-r--r--app-benchmarks/wrk/Manifest2
-rw-r--r--app-benchmarks/wrk/files/wrk-3.1.1-makefile.patch54
-rw-r--r--app-benchmarks/wrk/metadata.xml18
-rw-r--r--app-benchmarks/wrk/wrk-3.1.1.ebuild36
-rw-r--r--app-benchmarks/wrk/wrk-3.1.2.ebuild37
5 files changed, 147 insertions, 0 deletions
diff --git a/app-benchmarks/wrk/Manifest b/app-benchmarks/wrk/Manifest
new file mode 100644
index 000000000000..a458a6693321
--- /dev/null
+++ b/app-benchmarks/wrk/Manifest
@@ -0,0 +1,2 @@
+DIST wrk-3.1.1.tar.gz 901059 SHA256 3a44bd7c9da2edb80d41105c99c113250330b54bb9c3f80008eb6b088e5842ba SHA512 ed7bfa0549ce10046e5f054b75befc458f50dd8fa59d5c23194ce63ce18a3c0dd2e966a1397bbd2c1dea7b9ad2f4a8a6b3a5a9676c5202d53fa9406da75b7e19 WHIRLPOOL 3bcea7bfd5f80bd382d5fc83898b7afa3a2da4b6ed4349ad183dd80368c6d0c5127516ccc5cd569344b61de7357d12df8d7272709ba3ee976107989ffe41ff6f
+DIST wrk-3.1.2.tar.gz 902868 SHA256 da88a25f0eeb9e1fd6a9dcf4a96859e9e758f9446f0787cf7c95e4ccde14eefc SHA512 399f33c2c008c21ac8fae1b561fe16ebcca324b5171340ffa706e84c256bf13a9983b5c18d258be6f87cb9fe8e38a434f9bfa7059395a01cb783f77faf952b15 WHIRLPOOL 3460aadf5f3e54cf64d0779b45efba291200f0344a55b3a8c35a603d9fbb917c006ff2035fb91bfdce7652b7e4231fc43c558115cab4ff73b91087163655fe85
diff --git a/app-benchmarks/wrk/files/wrk-3.1.1-makefile.patch b/app-benchmarks/wrk/files/wrk-3.1.1-makefile.patch
new file mode 100644
index 000000000000..595c69ac1572
--- /dev/null
+++ b/app-benchmarks/wrk/files/wrk-3.1.1-makefile.patch
@@ -0,0 +1,54 @@
+diff --git i/Makefile w/Makefile
+index d956c6b..48be677 100644
+--- i/Makefile
++++ w/Makefile
+@@ -1,4 +1,4 @@
+-CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT
++CFLAGS += -std=c99 -Wall -D_REENTRANT
+ LIBS := -lpthread -lm -lcrypto -lssl
+
+ TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
+@@ -23,38 +23,31 @@ BIN := wrk
+ ODIR := obj
+ OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o
+
+-LDIR = deps/luajit/src
+-LIBS := -lluajit $(LIBS)
+-CFLAGS += -I$(LDIR)
+-LDFLAGS += -L$(LDIR)
++LIBS := $(shell pkg-config --libs luajit) $(LIBS)
++CFLAGS += $(shell pkg-config --cflags luajit)
+
+ all: $(BIN)
+
+ clean:
+ $(RM) $(BIN) obj/*
+- @$(MAKE) -C deps/luajit clean
+
+ $(BIN): $(OBJ)
+ @echo LINK $(BIN)
+- @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
++ @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+-$(OBJ): config.h Makefile $(LDIR)/libluajit.a | $(ODIR)
++$(OBJ): config.h Makefile | $(ODIR)
+
+ $(ODIR):
+ @mkdir -p $@
+
+ $(ODIR)/bytecode.o: src/wrk.lua
+ @echo LUAJIT $<
+- @$(SHELL) -c 'cd $(LDIR) && ./luajit -b $(CURDIR)/$< $(CURDIR)/$@'
++ @$(SHELL) -c 'luajit -b $(CURDIR)/$< $(CURDIR)/$@'
+
+ $(ODIR)/%.o : %.c
+ @echo CC $<
+ @$(CC) $(CFLAGS) -c -o $@ $<
+
+-$(LDIR)/libluajit.a:
+- @echo Building LuaJIT...
+- @$(MAKE) -C $(LDIR) BUILDMODE=static
+-
+ .PHONY: all clean
+ .SUFFIXES:
+ .SUFFIXES: .c .o .lua
diff --git a/app-benchmarks/wrk/metadata.xml b/app-benchmarks/wrk/metadata.xml
new file mode 100644
index 000000000000..f218e1558d16
--- /dev/null
+++ b/app-benchmarks/wrk/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>vikraman@gentoo.org</email>
+ <name>Vikraman Choudhury (vikraman)</name>
+ </maintainer>
+ <longdescription lang="en">
+ wrk is a modern HTTP benchmarking tool capable of generating
+ significant load when run on a single multi-core CPU. It combines a
+ multithreaded design with scalable event notification systems such as
+ epoll and kqueue. An optional LuaJIT script can perform HTTP request
+ generation, response processing, and custom reporting.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">wg/wrk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-benchmarks/wrk/wrk-3.1.1.ebuild b/app-benchmarks/wrk/wrk-3.1.1.ebuild
new file mode 100644
index 000000000000..60f01be903dc
--- /dev/null
+++ b/app-benchmarks/wrk/wrk-3.1.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A modern HTTP benchmarking tool"
+HOMEPAGE="https://github.com/wg/wrk"
+SRC_URI="https://github.com/wg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND="dev-libs/openssl:0 >=dev-lang/luajit-2.0.2"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ rm -rf deps/luajit || die "failed to remove bundled luajit"
+ epatch "${FILESDIR}/${P}-makefile.patch"
+}
+
+src_compile() {
+ tc-export CC
+ emake
+}
+
+src_install() {
+ dobin wrk
+ dodoc README NOTICE
+ insinto /usr/share/${PN}
+ doins -r scripts
+}
diff --git a/app-benchmarks/wrk/wrk-3.1.2.ebuild b/app-benchmarks/wrk/wrk-3.1.2.ebuild
new file mode 100644
index 000000000000..3c01bc5284d1
--- /dev/null
+++ b/app-benchmarks/wrk/wrk-3.1.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A modern HTTP benchmarking tool"
+HOMEPAGE="https://github.com/wg/wrk"
+SRC_URI="https://github.com/wg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND="dev-libs/openssl:0
+ >=dev-lang/luajit-2.0.2"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ rm -rf deps/luajit || die "failed to remove bundled luajit"
+ epatch "${FILESDIR}/${PN}-3.1.1-makefile.patch"
+}
+
+src_compile() {
+ tc-export CC
+ emake
+}
+
+src_install() {
+ dobin wrk
+ dodoc README NOTICE
+ insinto /usr/share/${PN}
+ doins -r scripts
+}