We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f68f25 commit 4ddafbdCopy full SHA for 4ddafbd
1 file changed
benchmark/http_simple.js
@@ -8,7 +8,8 @@ console.log('pid ' + process.pid);
8
9
var fixed = makeString(20 * 1024, 'C'),
10
storedBytes = {},
11
- storedBuffer = {};
+ storedBuffer = {},
12
+ storedUnicode = {};
13
14
var useDomains = process.env.NODE_USE_DOMAINS;
15
@@ -60,6 +61,16 @@ var server = http.createServer(function (req, res) {
60
61
}
62
body = storedBuffer[n];
63
64
+ } else if (command == 'unicode') {
65
+ var n = ~~arg;
66
+ if (n <= 0)
67
+ throw new Error('unicode called with n <= 0');
68
+ if (storedUnicode[n] === undefined) {
69
+ console.log('create storedUnicode[n]');
70
+ storedUnicode[n] = makeString(n, '\u263A');
71
+ }
72
+ body = storedUnicode[n];
73
+
74
} else if (command == 'quit') {
75
res.connection.server.close();
76
body = 'quitting';
0 commit comments