Skip to content
Open
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
5 changes: 0 additions & 5 deletions cloudflare-mysql/benchmark/select-100k-blog-rows.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ function selectRows() {
return;
}

var duration = (Date.now() - firstSelect) / 1000;
var hz = Math.round(rowCount / duration);

console.log(hz);

rowCount = 0;
firstSelect = null;

Expand Down
2 changes: 0 additions & 2 deletions cloudflare-mysql/lib/protocol/Protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,5 @@ export default class Protocol extends Stream {
}

var packetPayload = String(packet).replace(/^[^{]+/, '');

console.log('%s%s %s %s\n', direction, threadId, packetName, packetPayload);
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ function testNextDate(connection) {
assert.ifError(err);
assert.equal(rows.length, 1);
if (dt.getTime() !== rows[0].dt.getTime() || expected_date_string !== rows_raw[0].dt) {
console.log('Failure while testing date: ' + day + ', Timezone: ' + timezone);
console.log('Pre-statement: ' + pre_statements[pre_idx]);
console.log('Expected raw string: ' + expected_date_string);
console.log('Received raw string: ' + rows_raw[0].dt);
console.log('Expected date object: ' + dt.toISOString() + ' (' + dt.getTime() + ', ' + dt.toLocaleString() + ')');
console.log('Received date object: ' + rows[0].dt.toISOString() + ' (' + rows[0].dt.getTime() + ', ' + rows[0].dt.toLocaleString() + ')');
assert.strictEqual(expected_date_string, rows_raw[0].dt);
assert.strictEqual(dt.toISOString(), rows[0].dt.toISOString());
}
Expand Down
1 change: 0 additions & 1 deletion cloudflare-mysql/tool/free-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function run() {

check(port, function (used) {
if (used === false) {
console.log('%d', port);
process.exit(0);
} else {
setTimeout(next, 0);
Expand Down
2 changes: 0 additions & 2 deletions cloudflare-mysql/tool/generate-error-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ for (var i = 0; i < codes.length; i++) {
}
}

console.log('Wrote constants to ' + targetFile);

function appendGlobalErrorCodes(srcDir, codes) {
var headerFile = path.join(srcDir, 'include', 'mysys_err.h');
var code = '';
Expand Down
2 changes: 0 additions & 2 deletions cloudflare-mysql/tool/generate-type-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ for (var i = 0; i < types.length; i++) {
}
}

console.log('Wrote constants to ' + targetFile);

function extractMySqlVersion(srcDir) {
var versionFile = path.join(srcDir, 'VERSION');
var contents = fs.readFileSync(versionFile, 'utf-8');
Expand Down
2 changes: 0 additions & 2 deletions cloudflare-mysql/tool/lint-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ expectedToc.forEach(function (expectedLine) {
});

function expect (lineidx, message, line) {
console.log('Expected %s on line %d', message, (lineidx + 1));
console.log(' Got: %s', line);
process.exitCode = 1;
}

Expand Down
1 change: 0 additions & 1 deletion cloudflare-mysql/tool/mysql-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ function run() {
conn.destroy();

try {
console.log(conn._protocol._handshakeInitializationPacket.serverVersion);
process.exit(0);
} catch (e) {
console.error('unable to get mysql version');
Expand Down
1 change: 0 additions & 1 deletion cloudflare-mysql/tool/wait-mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function run() {
function next() {
check(host, port, function (connected) {
if (connected) {
console.log('connected to %s:%d', host, port);
process.exit(0);
} else {
setTimeout(next, CHECK_INTERVAL_MS);
Expand Down
8 changes: 0 additions & 8 deletions cloudflare-net-polyfill/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions cloudflare-net-polyfill/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ export class Socket extends EventEmitter {

const [ options, connectListener ]: [ SocketConnectOptions, ((...args: any[]) => void) ] = args;

console.log("Connect with", JSON.stringify(options));

if(connectListener)
this.once("connect", connectListener);

Expand Down Expand Up @@ -98,8 +96,6 @@ export class Socket extends EventEmitter {

private _read() {
this.cloudflareSocketReader?.read().then((data) => {
console.log("reading data");
console.log(JSON.stringify(data));

this._resetTimeout();

Expand All @@ -109,7 +105,6 @@ export class Socket extends EventEmitter {
this._read();
}
else {
console.log("reader is done");
}
}).catch((error) => console.error(error));
};
Expand Down Expand Up @@ -137,8 +132,6 @@ export class Socket extends EventEmitter {
write(data: string | Buffer | Uint16Array, encoding: BufferEncoding = "utf8", callback: Function): boolean {
this._resetTimeout();

console.log("write", JSON.stringify(data));

this.cloudflareSocketWriter?.write(data).then(() => callback());

return true;
Expand All @@ -165,8 +158,7 @@ export class Socket extends EventEmitter {
}

if(this.timeout.duration && this.timeout.duration > 0) {
this.timeoutId = setTimeout(() => {
console.log("wants to timeout");
this.timeoutId = setTimeout(() => {

this.timeout.callback?.();

Expand Down