This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use crate::sleep::TimeoutWorker; | |
| use crate::io::{FileWorker, IoTask}; | |
| use crate::task::Task; | |
| use futures::future::BoxFuture; | |
| use futures::FutureExt; | |
| use std::collections::VecDeque; | |
| use std::future::Future; | |
| use std::sync::{Arc, Mutex}; | |
| use std::task::{Context, Waker}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ┌───────────────────────────┬────────────┬────────────┬───────────┬────────────────────┐ | |
| │ Context │ metric │ Java │ NodeJS │ NodeJS (Clustered) │ | |
| ├───────────────────────────┼────────────┼────────────┼───────────┼────────────────────┤ | |
| │ CPU Bound Task │ http req │ 18 r/s │ 1 r/s │ 8 r/s │ | |
| │ - 150 vus for 30s │ cpu │ 100% │ 100% │ 100% │ | |
| │ │ memory │ ~ 2 GB │ ~ 1 GB │ ~ 2 GB │ | |
| ├───────────────────────────┼────────────┼────────────┼───────────┼────────────────────┤ | |
| │ IO Bound Task │ http req │ 190 r/s │ 804 r/s │ 951 r/s │ | |
| │ - 1000 vus for 10s │ cpu │ 60 - 70% │ 45% │ 70% │ | |
| │ │ memory │ ~ 4 GB │ ~ 2 GB │ ~ 3 GB │ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const axios = require('axios').default; | |
| const FormData = require('form-data'); | |
| const cmis = require("cmis"); | |
| const jwt = require('jsonwebtoken'); | |
| const mutexify = require('mutexify/promise') | |
| class CmisSessionManager { | |
| tenantSessions = new Map() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| var crypto = require('crypto'); | |
| const filename = 'rapid-fire.txt'; | |
| const key = "BX4X8G5Q1IQWEU4M23C3PGUV1AZQ91"; | |
| const iv = "XJLJ4YOQXTZ2TMGM"; | |
| // console.log(iv.toString(), key.toString()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function () { | |
| const mailRegex = /^\w+[\w-+.]*\@\w+([-.]\w+)*\.[a-zA-Z]{2,}$/; | |
| return { | |
| required: function (value) { | |
| return value !== null; | |
| }, | |
| email: function (value) { | |
| return value.match(mailRegex); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Color | Type | Doors | Tires | Class | |
|---|---|---|---|---|---|
| Red | SUV | 2 | Goodyear | + | |
| Blue | Minivan | 4 | Goodyear | - | |
| Green | Car | 4 | Goodyear | - | |
| Red | Minivan | 4 | MRE | - | |
| Green | Car | 2 | MRE | + | |
| Green | SUV | 4 | MRE | - | |
| Blue | SUV | 2 | MRE | - | |
| Blue | Car | 2 | Goodyear | + | |
| Red | SUV | 2 | MRE | - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import collections | |
| import hashlib | |
| import pickle | |
| import threading | |
| import time | |
| from socket import * | |
| import random | |
| HOST = gethostbyname('localhost') | |
| PORT = 12345 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| folder=$1 | |
| // cd $folder | |
| python3 "server.py" > server.log & | |
| python3 "client.py" > client.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.util.ClassUtils; | |
| import java.lang.reflect.Array; | |
| import java.lang.reflect.Constructor; | |
| import java.lang.reflect.Modifier; | |
| import java.util.*; | |
| public class InstanceCreator { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var a = [ | |
| { | |
| "Id": "t.6.C1PRGOO3ZFMACYDJ6H6LFOKCG:C1PRGOO3ZFMACYDJ6H6LFOKCG", | |
| "Version": "4.0", | |
| "GeneratedTime": "Jan 24, 2020 6:57:58 AM", | |
| "IsSecured": false, | |
| "IsRemote": false, | |
| "IsEmbedded": false, | |
| "HasDAC": false, | |
| "IsIndexingEnabled": true, |
NewerOlder