Skip to content

Commit fa79432

Browse files
authored
Merge pull request #583 from bcgov/yj
chore: aggr listings log
2 parents e038bed + a606984 commit fa79432

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

server/StrDss.Data/Repositories/RentalListingRepository.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,21 +238,22 @@ await _dbSet.AsNoTracking()
238238

239239
group.NightsBookedYtdQty = 0;
240240

241+
stopwatch.Restart();
242+
241243
foreach (var listing in listings)
242244
{
243-
stopwatch.Restart();
244-
245245
await SetExtraProperties(listing);
246246

247247
listing.Filtered = filteredIdSet.Contains(listing.RentalListingId ?? 0);
248248

249249
group.NightsBookedYtdQty += listing.NightsBookedYtdQty ?? 0;
250250

251-
stopwatch.Stop();
252-
253-
_logger.LogInformation($"Get Grouped Listings (extra properties) - Count: {listings.Count}, Time: {stopwatch.Elapsed.TotalSeconds} seconds");
254251
}
255252

253+
stopwatch.Stop();
254+
255+
_logger.LogInformation($"Get Grouped Listings (extra properties) - Count: {listings.Count}, Time: {stopwatch.Elapsed.TotalSeconds} seconds");
256+
256257
stopwatch.Restart();
257258

258259
var lastActionDtm = listings.Max(x => x.LastActionDtm);

0 commit comments

Comments
 (0)