Skip to content

Commit 4b82829

Browse files
committed
[DEBUG] Add more logs to debug athena
1 parent 70beacc commit 4b82829

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

packages/cubejs-testing-drivers/src/helpers/buildPreaggs.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,14 @@ export async function buildPreaggs(
5353
selector: any,
5454
) {
5555
return new Promise((resolve, reject) => {
56-
console.log('Starting building pre-agg', selector);
57-
5856
postRequest(
5957
port,
6058
'/cubejs-api/v1/pre-aggregations/jobs',
6159
token,
6260
{ action: 'post', selector },
6361
).then((post) => {
64-
console.log('Building pre-agg postRequest callback', selector);
65-
6662
readData(post).then((_jobs) => {
67-
console.log('Building pre-agg readData callback', selector);
68-
6963
const jobs = <string[]>JSON.parse(_jobs.toString());
70-
71-
console.log('Building pre-agg readData jobs', selector, jobs);
7264
if (jobs.length === 0) {
7365
resolve(true);
7466
} else {
@@ -81,7 +73,6 @@ export async function buildPreaggs(
8173
{ action: 'get', resType: 'object', tokens: jobs },
8274
);
8375
const statuses = JSON.parse((await readData(get)).toString());
84-
console.log('Building pre-agg readData jobs statuses', selector, statuses);
8576
Object.keys(statuses).forEach((t: string) => {
8677
const { status } = statuses[t];
8778
if (status.indexOf('failure') >= 0) {

packages/cubejs-testing-drivers/src/tests/testIncrementalSchemaLoading.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ export function incrementalSchemaLoadingSuite(
2626
});
2727

2828
execute('should load schemas', async () => {
29+
const start = performance.now();
30+
console.log('should load schemas', 'start');
2931
const inputSchemas: QuerySchemasResult[] = await driver().getSchemas();
32+
console.log('should load schemas', 'after getSchemas', performance.now() - start);
33+
console.log('should load schemas', 'inputSchemas', inputSchemas);
3034
expect(inputSchemas).toBeInstanceOf(Array);
3135
expect(inputSchemas.length).toBeGreaterThan(0);
3236
expect(inputSchemas).toContainEqual({
@@ -35,9 +39,14 @@ export function incrementalSchemaLoadingSuite(
3539
});
3640

3741
execute('should load tables for specific schemas', async () => {
42+
const start = performance.now();
43+
console.log('should load tables for specific schemas', 'start');
3844
let inputSchemas: QuerySchemasResult[] = await driver().getSchemas();
45+
console.log('should load schemas', 'after getSchemas', performance.now() - start);
3946
inputSchemas = inputSchemas.filter((s) => !!s.schema_name);
4047
const inputTables = await driver().getTablesForSpecificSchemas(inputSchemas);
48+
console.log('should load schemas', 'after getTablesForSpecificSchemas', performance.now() - start);
49+
console.log('should load schemas', 'inputTables', inputTables);
4150
expect(inputTables).toBeInstanceOf(Array);
4251
expect(inputTables.length).toBeGreaterThan(0);
4352
expect(inputTables).toContainEqual({

packages/cubejs-testing-drivers/src/tests/testQueries.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
141141

142142
// MUST be the first test in the list!
143143
execute('must built pre-aggregations', async () => {
144-
console.log('Starting building pre-aggs');
145144
await buildPreaggs(env.cube.port, apiToken, {
146145
timezones: ['UTC'],
147146
preAggregations: ['Customers.RAExternal'],

0 commit comments

Comments
 (0)