Browse Source

Actix: change endpoints (#5745)

* change endpoints

* update rustc
Nikolay Kim 5 years ago
parent
commit
16d6cb9d10

+ 1 - 1
frameworks/Rust/actix/actix-core.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.42
+FROM rust:1.44
 
 
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 
 

+ 1 - 1
frameworks/Rust/actix/actix-diesel.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.42
+FROM rust:1.44
 
 
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 
 

+ 1 - 1
frameworks/Rust/actix/actix-pg.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.42
+FROM rust:1.44
 
 
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 
 

+ 1 - 1
frameworks/Rust/actix/actix-raw.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.42
+FROM rust:1.44
 
 
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 
 

+ 1 - 1
frameworks/Rust/actix/actix.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.42
+FROM rust:1.44
 
 
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 RUN apt-get update -yqq && apt-get install -yqq cmake g++
 
 

+ 6 - 6
frameworks/Rust/actix/benchmark_config.json

@@ -2,8 +2,8 @@
   "framework": "actix",
   "framework": "actix",
   "tests": [{
   "tests": [{
     "default": {
     "default": {
-      "json_url": "/j",
-      "plaintext_url": "/p",
+      "json_url": "/json",
+      "plaintext_url": "/plaintext",
       "port": 8080,
       "port": 8080,
       "approach": "Realistic",
       "approach": "Realistic",
       "classification": "Micro",
       "classification": "Micro",
@@ -20,8 +20,8 @@
       "versus": ""
       "versus": ""
     },
     },
     "core": {
     "core": {
-      "fortune_url": "/f",
-      "db_url": "/d",
+      "fortune_url": "/fortune",
+      "db_url": "/db",
       "query_url": "/queries?q=",
       "query_url": "/queries?q=",
       "update_url": "/updates?q=",
       "update_url": "/updates?q=",
       "port": 8080,
       "port": 8080,
@@ -40,8 +40,8 @@
       "versus": ""
       "versus": ""
     },
     },
     "raw": {
     "raw": {
-      "json_url": "/j",
-      "plaintext_url": "/p",
+      "json_url": "/json",
+      "plaintext_url": "/plaintext",
       "port": 8080,
       "port": 8080,
       "approach": "Realistic",
       "approach": "Realistic",
       "classification": "Platform",
       "classification": "Platform",

+ 2 - 2
frameworks/Rust/actix/src/main.rs

@@ -61,8 +61,8 @@ async fn main() -> std::io::Result<()> {
                 .client_timeout(0)
                 .client_timeout(0)
                 .h1(map_config(
                 .h1(map_config(
                     App::new()
                     App::new()
-                        .service(web::resource("/j").to(json))
-                        .service(web::resource("/p").to(plaintext)),
+                        .service(web::resource("/json").to(json))
+                        .service(web::resource("/plaintext").to(plaintext)),
                     |_| AppConfig::default(),
                     |_| AppConfig::default(),
                 ))
                 ))
                 .tcp()
                 .tcp()

+ 2 - 2
frameworks/Rust/actix/src/main_platform.rs

@@ -49,7 +49,7 @@ impl Service for App {
     fn call(&mut self, req: Request) -> Self::Future {
     fn call(&mut self, req: Request) -> Self::Future {
         let path = req.path();
         let path = req.path();
         match path {
         match path {
-            "/d" => {
+            "/db" => {
                 let h_srv = self.hdr_srv.clone();
                 let h_srv = self.hdr_srv.clone();
                 let h_ct = self.hdr_ctjson.clone();
                 let h_ct = self.hdr_ctjson.clone();
                 let fut = self.db.get_world();
                 let fut = self.db.get_world();
@@ -63,7 +63,7 @@ impl Service for App {
                     Ok(res)
                     Ok(res)
                 })
                 })
             }
             }
-            "/f" => {
+            "/fortune" => {
                 let h_srv = self.hdr_srv.clone();
                 let h_srv = self.hdr_srv.clone();
                 let h_ct = self.hdr_cthtml.clone();
                 let h_ct = self.hdr_cthtml.clone();
                 let fut = self.db.tell_fortune();
                 let fut = self.db.tell_fortune();

+ 2 - 2
frameworks/Rust/actix/src/main_raw.rs

@@ -45,7 +45,7 @@ struct App {
 impl App {
 impl App {
     fn handle_request(&mut self, req: Request) {
     fn handle_request(&mut self, req: Request) {
         match req.path() {
         match req.path() {
-            "/j" => {
+            "/json" => {
                 let message = Message {
                 let message = Message {
                     message: "Hello, World!",
                     message: "Hello, World!",
                 };
                 };
@@ -55,7 +55,7 @@ impl App {
                     .json_write(&mut Writer(&mut self.write_buf))
                     .json_write(&mut Writer(&mut self.write_buf))
                     .unwrap();
                     .unwrap();
             }
             }
-            "/p" => {
+            "/plaintext" => {
                 self.write_buf.put_slice(PLAIN);
                 self.write_buf.put_slice(PLAIN);
                 self.codec.config().set_date(&mut self.write_buf);
                 self.codec.config().set_date(&mut self.write_buf);
                 self.write_buf.put_slice(BODY);
                 self.write_buf.put_slice(BODY);