This file contains 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 url = process.argv[2]; | |
const concurrency = process.argv[3] === undefined ? 1 : parseInt(process.argv[3]); | |
const requestInterval = process.argv[4] === undefined ? 10000 : parseInt(process.argv[4]); | |
if (url === undefined || isNaN(concurrency) || isNaN(requestInterval)) { | |
console.log('Usage: node no_keepalive_test.js http://google.com/ 10 10000'); | |
console.log('Where: 2nd - URL'); | |
console.log(' 3rd - amount of concurrent connections (default is 1)'); | |
console.log(' 4rd - interval between sequential requests'); | |
process.exit(); |
This file contains 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 url = process.argv[2]; | |
const concurrency = process.argv[3] === undefined ? 1 : parseInt(process.argv[3]); | |
const requestInterval = process.argv[4] === undefined ? 10000 : parseInt(process.argv[4]); | |
if (url === undefined || isNaN(concurrency) || isNaN(requestInterval)) { | |
console.log('Usage: node keepalive_test.js http://google.com/ 10 10000'); | |
console.log('Where: 2nd - URL'); | |
console.log(' 3rd - amount of concurrent connections (default is 1)'); | |
console.log(' 4rd - interval between sequential requests'); | |
process.exit(); |
This file contains 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 {EventEmitter} = require('events'); | |
const ee = new EventEmitter(); | |
function log(...args) { | |
console.log(Date.now() / 1000, ...args); | |
} | |
function blockingOperation() { | |
log('-- Blocking operation has started'); |
This file contains 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
setTimeout(() => { process.exit(); }, 200); | |
function f() { | |
try { | |
return new Promise((resolve, reject) => { | |
throw new Error('Error: Threw right in the executor'); | |
}); | |
} catch (err) { | |
console.log('Error caught in f()', err); | |
} |
This file contains 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 cluster = require('cluster'); | |
async function waitForMessage(child) { | |
return new Promise(resolve => { | |
child.once('message', msg => { | |
console.log('Master. waitForMessage. Message is received', msg); | |
return resolve(); | |
}); | |
}); | |
} |
This file contains 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 {EventEmitter} = require('events'); | |
const ee = new EventEmitter(); | |
function waitForMessage() { | |
return new Promise(resolve => { | |
ee.once('message', msg => { | |
console.log('waitForMessage. Message is received', msg); | |
resolve(); | |
console.log('waitForMessage. Ooops, resolve will run in microtask. not immediately'); |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
int main(int argc, char *argv[]) | |
{ | |
struct addrinfo hints, *res, *p; |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
int main(int argc, char *argv[]) | |
{ | |
struct addrinfo hints, *res, *p; |
This file contains 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
#include <arpa/inet.h> | |
#include <net/if.h> | |
#include <ifaddrs.h> | |
#include <netdb.h> | |
#include <stdio.h> | |
int main(int argc, char* argv[], char* envp[]) { | |
struct ifaddrs *ifa=NULL,*ifEntry=NULL; | |
void *addPtr = NULL; | |
int rc = 0; |
This file contains 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
diff -upr linux-2.6.32-696.18.7.el6.orig/drivers/net/tg3.c linux-2.6.32-696.18.7.el6-042stab127_2/drivers/net/tg3.c | |
--- linux-2.6.32-696.18.7.el6.orig/drivers/net/tg3.c 2017-12-29 01:55:16.000000000 +0300 | |
+++ linux-2.6.32-696.18.7.el6-042stab127_2/drivers/net/tg3.c 2018-01-04 15:28:20.074107990 +0300 | |
@@ -234,6 +234,11 @@ static int tg3_debug = -1; /* -1 == use | |
module_param(tg3_debug, int, 0); | |
MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); | |
+static int tg3_pcie_mrrs_boost = 0; | |
+module_param(tg3_pcie_mrrs_boost, int, S_IRUGO); | |
+MODULE_PARM_DESC(tg3_pcie_mrrs_boost, "Increase Tigon3 PCI MRRS " |
NewerOlder