Skip to content
Merged

aa #2

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void main(String[] args) {
// json
ServletInfo jsonServletInfo = new ServletInfo();
jsonServletInfo.setServletName("json");
jsonServletInfo.setServletClass(HelloWorldServlet.class.getName());
jsonServletInfo.setServletClass(JsonServlet.class.getName());
jsonServletInfo.addMapping("/json");
applicationRuntime.getDeploymentInfo().addServlet(jsonServletInfo);
containerRuntime.addRuntime(applicationRuntime);
Expand Down
6 changes: 2 additions & 4 deletions frameworks/PHP/ubiquity/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@
"database_os": "Linux",
"display_name": "ubiquity-roadrunner",
"notes": "",
"versus": "php",
"tags": ["broken"]
"versus": "php"
},
"roadrunner-mysql": {
"db_url": "/DbMy",
Expand All @@ -134,8 +133,7 @@
"database_os": "Linux",
"display_name": "ubiquity-roadrunner-mysql",
"notes": "",
"versus": "php",
"tags": ["broken"]
"versus": "php"
},
"workerman-mysql": {
"db_url": "/DbMy",
Expand Down
9 changes: 5 additions & 4 deletions frameworks/PHP/ubiquity/ubiquity-roadrunner-mysql.dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM ubuntu:20.04
FROM ubuntu:20.10

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq php7.4 php7.4-common php7.4-cgi php-curl php7.4-mysql > /dev/null
apt-get install -yqq php8.0 php8.0-common php8.0-cgi php-curl php8.0-mysql > /dev/null

RUN apt-get install -yqq composer > /dev/null

RUN apt-get install -y php-pear php-dev > /dev/null

COPY deploy/conf/php-async.ini /etc/php/7.4/cgi/php.ini
COPY deploy/conf/php-async.ini /etc/php/8.0/cgi/php.ini

ADD ./ /ubiquity
WORKDIR /ubiquity
Expand All @@ -37,7 +37,8 @@ RUN chmod 755 /bin/envwrapper.sh

RUN chmod 777 -R /ubiquity/.ubiquity/*

#RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/7.4/cgi/php.ini
#RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.0/cgi/php.ini
RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=tracing\n" >> /etc/php/8.0/cgi/php.ini

COPY deploy/conf/roadrunner/mysql/rrServices.php app/config/rrServices.php

Expand Down
9 changes: 5 additions & 4 deletions frameworks/PHP/ubiquity/ubiquity-roadrunner.dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

FROM ubuntu:20.04
FROM ubuntu:20.10

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq php7.4 php7.4-common php7.4-cgi php7.4-pgsql php-curl > /dev/null
apt-get install -yqq php8.0 php8.0-common php8.0-cgi php8.0-pgsql php-curl > /dev/null

RUN apt-get install -yqq composer > /dev/null

RUN apt-get install -y php-pear php-dev > /dev/null


COPY deploy/conf/php-async.ini /etc/php/7.4/cgi/php.ini
COPY deploy/conf/php-async.ini /etc/php/8.0/cgi/php.ini

ADD ./ /ubiquity
WORKDIR /ubiquity
Expand All @@ -39,7 +39,8 @@ RUN chmod 755 /bin/envwrapper.sh

RUN chmod 777 -R /ubiquity/.ubiquity/*

#RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/7.4/cgi/php.ini
#RUN echo "opcache.preload=/ubiquity/app/config/preloader.script.php" >> /etc/php/8.0/cgi/php.ini
RUN echo "opcache.jit_buffer_size=128M\nopcache.jit=function\n" >> /etc/php/8.0/cgi/php.ini

COPY deploy/conf/roadrunner/pgsql/rrServices.php app/config/rrServices.php

Expand Down
10 changes: 3 additions & 7 deletions frameworks/Rust/ntex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ path = "src/main_db.rs"
name = "ntex-raw"
path = "src/main_raw.rs"

[[bin]]
name = "ntex-sailfish"
path = "src/main_sailfish.rs"

[dependencies]
ntex = "0.2.0-b.5"
mimalloc = { version = "0.1.21", default-features = false }
ntex = "0.2.0-b.9"
mimalloc = { version = "0.1.22", default-features = false }
snmalloc-rs = { version = "0.2.23", features = ["1mib", "native-cpu"] }
yarte = { version = "0.14", features = ["bytes-buf", "json"] }
env_logger = "0.8"
random-fast-rng = "0.1.1"
Expand All @@ -37,7 +34,6 @@ serde = { version = "1.0", features = ["derive"] }
log = { version = "0.4", features = ["release_max_level_off"] }
tokio = "=0.2.6"
tokio-postgres = { git="https://github.com/fafhrd91/postgres.git" }
sailfish = "0.3.0"

[profile.release]
lto = true
Expand Down
17 changes: 0 additions & 17 deletions frameworks/Rust/ntex/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,6 @@
"notes": "",
"versus": ""
},
"sailfish": {
"fortune_url": "/fortunes",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"database": "Postgres",
"framework": "ntex",
"language": "Rust",
"orm": "Raw",
"platform": "None",
"webserver": "ntex",
"os": "Linux",
"database_os": "Linux",
"display_name": "ntex [sailfish]",
"notes": "",
"versus": ""
},
"raw": {
"json_url": "/json",
"plaintext_url": "/plaintext",
Expand Down
12 changes: 0 additions & 12 deletions frameworks/Rust/ntex/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@ platform = "None"
webserver = "ntex"
versus = ""

[sailfish]
urls.fortune = "/fortunes"
approach = "Realistic"
classification = "Micro"
database = "Postgres"
database_os = "Linux"
os = "Linux"
orm = "Raw"
platform = "None"
webserver = "ntex"
versus = ""

[db]
urls.db = "/db"
urls.query = "/query?q="
Expand Down
13 changes: 0 additions & 13 deletions frameworks/Rust/ntex/ntex-sailfish.dockerfile

This file was deleted.

13 changes: 5 additions & 8 deletions frameworks/Rust/ntex/src/db.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::borrow::Cow;
use std::cell::RefCell;
use std::fmt::Write as FmtWrite;
use std::io;
use std::{borrow::Cow, cell::RefCell, fmt::Write as FmtWrite, io};

use bytes::{Bytes, BytesMut};
use futures::stream::futures_unordered::FuturesUnordered;
Expand All @@ -13,7 +10,7 @@ use tokio_postgres::types::ToSql;
use tokio_postgres::{connect, Client, NoTls, Statement};
use yarte::{ywrite_html, Serialize};

#[derive(Serialize, Debug)]
#[derive(Copy, Clone, Serialize, Debug)]
pub struct World {
pub id: i32,
pub randomnumber: i32,
Expand Down Expand Up @@ -154,10 +151,10 @@ impl PgConnection {
for w in &worlds {
params.push(&w.id);
}

cl.query(&st, &params)
let _ = cl
.query(&st, &params)
.await
.map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{:?}", e)))?;
.map_err(|e| log::error!("{:?}", e));

Ok(worlds)
}
Expand Down
2 changes: 1 addition & 1 deletion frameworks/Rust/ntex/src/main_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl Future for App {
}
}
if updated {
this.state.dsp_flush_write_data(cx.waker());
this.state.dsp_restart_write_task();
}
if !this.state.is_read_ready() {
this.state.dsp_read_more_data(cx.waker());
Expand Down
151 changes: 0 additions & 151 deletions frameworks/Rust/ntex/src/main_sailfish.rs

This file was deleted.