Skip to content

Commit

Permalink
Benchmark without offset
Browse files Browse the repository at this point in the history
  • Loading branch information
loicsaintroch committed Oct 1, 2024
1 parent 6917fdf commit d0a0aef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions services/libs/data-access-layer/src/activities/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ export async function queryActivities(
if (!(arg.noLimit === true)) {
arg.limit = arg.limit || 20
}
arg.offset = arg.offset || 0
// arg.offset = arg.offset || 0
arg.countOnly = arg.countOnly || false

if (arg.filter.member) {
Expand Down Expand Up @@ -542,8 +542,8 @@ export async function queryActivities(
const params: any = {
tenantId: arg.tenantId,
segmentIds: arg.segmentIds,
lowerLimit: arg.offset,
upperLimit: arg.offset + arg.limit - 1,
// lowerLimit: arg.offset,
// upperLimit: arg.offset + arg.limit - 1,
}
let filterString = RawQueryParser.parseFilters(
arg.filter,
Expand Down Expand Up @@ -589,7 +589,7 @@ export async function queryActivities(
rows: [],
count: Number(countResults),
limit: arg.limit,
offset: arg.offset,
// offset: arg.offset,
}
} else {
const columnString = columns
Expand Down Expand Up @@ -674,7 +674,7 @@ export async function queryActivities(
count: Number(count),
rows: results,
limit: arg.limit,
offset: arg.offset,
// offset: arg.offset,
}
}

Expand Down
2 changes: 1 addition & 1 deletion services/libs/types/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface PageData<T> {
rows: T[]
count: number
limit: number
offset: number
offset?: number
}

export interface QueryData {
Expand Down

0 comments on commit d0a0aef

Please sign in to comment.