Browse Source

C++/luna remove TE deps [ci fw-only C++/luna] (#3557)

Remove C++/luna per maintainer's recommendation
Nate 7 years ago
parent
commit
4cd9d05d32

+ 0 - 1
.travis.yml

@@ -29,7 +29,6 @@ env:
      - "TESTDIR=C++/ulib"
      - "TESTDIR=C++/wt"
      - "TESTDIR=C++/poco"
-     - "TESTDIR=C++/luna"
      - "TESTDIR=Clojure/aleph"
      - "TESTDIR=Clojure/compojure"
      - "TESTDIR=Clojure/http-kit"

+ 0 - 19
frameworks/C++/luna/CMakeLists.txt

@@ -1,19 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-project(lunabench)
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-
-include(conanbuildinfo.cmake)
-conan_basic_setup()
-
-set(DEFAULT_SOURCE_FILES default.cpp common.h)
-add_executable(lunabench_default ${DEFAULT_SOURCE_FILES})
-target_link_libraries(lunabench_default ${CONAN_LIBS})
-
-set(EPOLL_SOURCE_FILES epoll.cpp common.h)
-add_executable(lunabench_epoll ${EPOLL_SOURCE_FILES})
-target_link_libraries(lunabench_epoll ${CONAN_LIBS})
-
-set(THREAD_SOURCE_FILES thread.cpp common.h)
-add_executable(lunabench_thread ${THREAD_SOURCE_FILES})
-target_link_libraries(lunabench_thread ${CONAN_LIBS})

+ 0 - 40
frameworks/C++/luna/README.md

@@ -1,40 +0,0 @@
-#Luna Benchmarking Test
-
-[Luna](https://github.com/DEGoodmanWilson/luna) is a web framework for modern C++, designed for low latency and high throughput. These tests use version 2.10.1 of Luna.
-
-### Source Code
-
-* [Default threading mode, with thread pool](default.cpp)
-* [epoll threading mode (linux only)](epoll.cpp)
-* [Thread-per-connection mode](thread.cpp)
-
-### Test URLs
-
-[/plaintext](http://www.techempower.com/benchmarks/#section=plaintext)
-----------
-```
-HTTP/1.1 200 OK
-Connection: Keep-Alive
-Content-Length: 13
-Server: luna/2.10.1
-Content-Type: text/plain
-Server: luna
-Date: Thu, 13 Apr 2017 11:40:58 GMT
-
-Hello, world!
-```
-
-
-[/json](http://www.techempower.com/benchmarks/#section=json)
-----------
-```
-HTTP/1.1 200 OK
-Connection: Keep-Alive
-Content-Length: 27
-Server: luna/2.10.1
-Content-Type: application/json
-Server: luna
-Date: Thu, 13 Apr 2017 11:40:58 GMT
-
-{"message":"Hello, World!"}
-```

+ 0 - 59
frameworks/C++/luna/benchmark_config.json

@@ -1,59 +0,0 @@
-{
-  "framework": "luna",
-  "tests": [{
-    "default": {
-      "json_url": "/json",
-      "plaintext_url": "/plaintext",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "None",
-      "framework": "luna",
-      "language": "C++",
-      "orm": "Raw",
-      "platform": "None",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "Luna",
-      "notes": "",
-      "versus": ""
-    },
-    "epoll": {
-      "json_url": "/json",
-      "plaintext_url": "/plaintext",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "None",
-      "framework": "luna",
-      "language": "C++",
-      "orm": "Raw",
-      "platform": "None",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "Luna",
-      "notes": "",
-      "versus": ""
-    },
-    "thread": {
-      "json_url": "/json",
-      "plaintext_url": "/plaintext",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Fullstack",
-      "database": "None",
-      "framework": "luna",
-      "language": "C++",
-      "orm": "Raw",
-      "platform": "None",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "Luna",
-      "notes": "",
-      "versus": ""
-    }
-  }]
-}

+ 0 - 36
frameworks/C++/luna/common.h

@@ -1,36 +0,0 @@
-//
-// Created by Don Goodman-Wilson on 15/04/2017.
-//
-
-#pragma once
-
-#include <luna/luna.h>
-#include <nlohmann/json.hpp>
-
-using json = nlohmann::json;
-
-// Request handlers
-
-// /json
-auto json_handler = [](auto req) -> luna::response {
-    json j;
-    j["message"] = "Hello, World!";
-
-    return {
-            200,
-            luna::response_headers{{"Server", "luna"}},
-            "application/json",
-            j.dump(),
-    };
-};
-
-// /plaintext
-auto plaintext_handler = [](auto req) -> luna::response {
-    return {
-            200,
-            luna::response_headers{{"Server", "luna"}},
-            "text/plain",
-            "Hello, world!",
-    };
-};
-

+ 0 - 6
frameworks/C++/luna/conanfile.txt

@@ -1,6 +0,0 @@
-[requires]
-luna/2.11.0@DEGoodmanWilson/stable
-json/2.1.0@jjones646/stable
-
-[generators]
-cmake

+ 0 - 30
frameworks/C++/luna/default.cpp

@@ -1,30 +0,0 @@
-#include <iostream>
-#include <luna/luna.h>
-#include "common.h"
-
-// Main entrypoint
-
-int main(int argc, char **argv) {
-    if (argc != 3) {
-        std::cerr << "Usage: " << argv[0] << " port nthreads" << std::endl;
-        return 1;
-    }
-
-    auto port = static_cast<uint16_t>(std::atoi(argv[1]));
-    auto threads = static_cast<uint16_t>(std::atoi(argv[2]));
-
-    luna::server server{
-            luna::server::port{port},
-            luna::server::thread_pool_size{threads},
-    };
-
-    server.handle_request(luna::request_method::GET,
-                          "/plaintext",
-                          plaintext_handler);
-
-    server.handle_request(luna::request_method::GET,
-                          "/json",
-                          json_handler);
-
-    server.await();
-}

+ 0 - 31
frameworks/C++/luna/epoll.cpp

@@ -1,31 +0,0 @@
-#include <iostream>
-#include <luna/luna.h>
-#include "common.h"
-
-// Main entrypoint
-
-int main(int argc, char **argv) {
-    if (argc != 3) {
-        std::cerr << "Usage: " << argv[0] << " port nthreads" << std::endl;
-        return 1;
-    }
-
-    auto port = static_cast<uint16_t>(std::atoi(argv[1]));
-    auto threads = static_cast<uint16_t>(std::atoi(argv[2]));
-
-    luna::server server{
-            luna::server::port{port},
-            luna::server::use_epoll_if_available{true},
-            luna::server::thread_pool_size{threads},
-    };
-
-    server.handle_request(luna::request_method::GET,
-                          "/plaintext",
-                          plaintext_handler);
-
-    server.handle_request(luna::request_method::GET,
-                          "/json",
-                          json_handler);
-
-    server.await();
-}

+ 0 - 15
frameworks/C++/luna/luna-base.dockerfile

@@ -1,15 +0,0 @@
-FROM techempower/gcc-4.9:0.1
-
-RUN apt install -yqq python-dev python-pip cmake autoconf
-
-# We're using conan 0.28.1 because, as of this writing, later versions of conan
-# are incompatible with the luna framework, and luna is the only framework that
-# uses conan.
-RUN pip install conan==0.28.1
-
-ADD ./ /luna
-WORKDIR /luna
-
-RUN CC=gcc-4.9 CXX=g++-4.9 conan install --build=missing -s compiler="gcc" -s compiler.version="4.9" .
-RUN cmake . -DCMAKE_CXX_COMPILER=g++-4.9 -DCMAKE_CC_COMPILER=gcc-4.9
-RUN cmake --build .

+ 0 - 3
frameworks/C++/luna/luna-epoll.dockerfile

@@ -1,3 +0,0 @@
-FROM techempower/luna-base:0.1
-
-CMD /luna/bin/lunabench_epoll 8080 $((2 * $(nproc)))

+ 0 - 3
frameworks/C++/luna/luna-thread.dockerfile

@@ -1,3 +0,0 @@
-FROM techempower/luna-base:0.1
-
-CMD /luna/bin/lunabench_thread 8080

+ 0 - 3
frameworks/C++/luna/luna.dockerfile

@@ -1,3 +0,0 @@
-FROM techempower/luna-base:0.1
-
-CMD /luna/bin/lunabench_default 8080 $((2 * $(nproc)))

+ 0 - 29
frameworks/C++/luna/thread.cpp

@@ -1,29 +0,0 @@
-#include <iostream>
-#include <luna/luna.h>
-#include "common.h"
-
-// Main entrypoint
-
-int main(int argc, char **argv) {
-    if (argc != 2) {
-        std::cerr << "Usage: " << argv[0] << " port" << std::endl;
-        return 1;
-    }
-
-    auto port = static_cast<uint16_t>(std::atoi(argv[1]));
-
-    luna::server server{
-            luna::server::port{port},
-            luna::server::use_thread_per_connection{true},
-    };
-
-    server.handle_request(luna::request_method::GET,
-                          "/plaintext",
-                          plaintext_handler);
-
-    server.handle_request(luna::request_method::GET,
-                          "/json",
-                          json_handler);
-
-    server.await();
-}