Skip to content

Commit 7723720

Browse files
feat(cat-voices): database queries cleanup (#3672)
* docs: capture initial times * chore: remove cacheDocument * turn off logging * chore: use debugPrint instead of logger * feat: bulk documents save * batching sync * chore: move exact ref resoling to getDocumentData instead of index * fix: DocumentRepository * chore: simplify getting documents data * remove getAllDocumentsRefs and getCachedDocumentsRefs from DocumentRepository. Index is only available in DocumentDataRemoteSource * chore: update docs * simplified document index endpoint * remove randomness from LocalCatGateway * indexing by batch size * wip: filtering by types * Rework filtering refs + checking all refs if already cached in parallel * docs * update indexing.csv * update indexing csv * chore: cleanup * trailing new line * chore * move performance tab to docs * bulk saving typed docs in parallel * chore: revert hardcoded timestamp * chore: typos * split _sync into smaller functions + add documentation * little refactor * fix: analyzer * initial v2 tables * wip * wip * feat: database migration * chore: cleanup * bump batch size * cleanup * chore: remove defensive content decoding * chore: daos * spelling * saveAll * test on platform * chore: update build scripts * feat: DocumentsV2Dao methods * simple proposals pagination query * chore: create a JoinedProposalBriefEntity * rename method * feat: exclude hidden proposals * more tests * renaming and splitting logic into smaller parts * feat: per language strategy * remove CatalystDatabaseLanguage in favor of raw queries as they are easier to mange * remove Index Strategy Documentation * handle case where ref is empty * migration now includes indexes * use v2 documents table for saveAll and isCachedBulk * adds ActionType to JoinedProposalBriefEntity * adds versionIds to JoinedProposalBriefEntity * comments count * adds isFavorite to JoinedProposalBriefEntity * add template to JoinedProposalBriefEntity * adds documentsLocalMetadata table for auto updates * Update docs * use v2 proposals query for discovery most recent section * feat: simplify most recent proposals section * add proposal fav status for v2 tables * local proposal fav status update * update fav state locally for faster feedback * self review * fix tests * update times * fix: analyzer * more migration test data * clean up constructors * cleanup * fix: template tests * spelling * fix: spelling * chore: PR review adjustments * add order parameter * ProposalsOrder docs * GetProposalsBriefPage supports order * add filters object * proposalsBriefPage filtering * fix: status filtering * more draft proposals filtering tests * Campaign proposals filter * update docs * expose getVisibleProposalsCount and tests * expose filters parameter * integrate proposals page with v2 queries * chore: increase time diff between proposals * chore: reduce count query tables watched when not needed * local proposals cubit * local proposal fav staus update * docs * fix: add discovery specific colors (#3637) * fix code-generator earthly target * use logger in migration + wrap in transaction * spelling * wip * rename category to categoryId for better consistency * adding vote data to ProposalBriefData * fix: dependencies * voting page + cubit integration - wip * proposals per tab selector * release completed in close * extract early return logic into function * Voting tabs selector + releasing completer on close * move spaces blocs to shell page level * fix: voting in grid view * dummy voting integration * chore: remove showComments * docs: ProposalOrDocument * create proposals/count query .csv files * update proposals query times * category indexes * CatId parse and tryParse * create new tables for authors * update migration * run database analyze after sync * DocumentAuthors docs * simpler copyWith * cat.id keeps schema * get rid of authorCatIdWithoutUsername column * console profiler * catId -> id * times * results notes * spelling * fix: analyzer * update results (#3673) * fix: readme * remove CatalystRuntimeProfiler * catId schema -> scheme * rename * bring back profiler to SignedDocumentManager, with debounce --------- Co-authored-by: Ryszard Schossler <[email protected]>
1 parent 5bf67f6 commit 7723720

File tree

46 files changed

+1058
-307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1058
-307
lines changed

catalyst_voices/apps/voices/lib/configs/bootstrap.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,13 @@ Future<BootstrapArgs> bootstrap({
9191
fromTo: DateRange(from: startConfigTimestamp, to: endConfigTimestamp),
9292
);
9393

94-
final runtimeProfiler = CatalystRuntimeProfiler(profiler)..start(at: bootstrapStartTimestamp);
95-
9694
await Dependencies.instance.init(
9795
config: config,
9896
environment: environment,
9997
loggingService: _loggingService,
10098
reportingService: _reportingService,
10199
profiler: profiler,
102100
startupProfiler: startupProfiler,
103-
runtimeProfiler: runtimeProfiler,
104101
);
105102

106103
final router = buildAppRouter(initialLocation: initialLocation);
@@ -216,14 +213,16 @@ Future<void> registerDependencies({
216213
/// - [CatalystNoopProfiler] for debug mode (no overhead)
217214
CatalystProfiler _createProfiler(AppConfig config) {
218215
if (kProfileMode) {
219-
return CatalystDeveloperProfiler.fromConfig(config.developerProfiler);
216+
return config.profiler.console
217+
? const CatalystProfiler.console()
218+
: CatalystProfiler.developer(config.profiler);
220219
}
221220

222221
if (_shouldUseSentry) {
223-
return const CatalystSentryProfiler();
222+
return const CatalystProfiler.sentry();
224223
}
225224

226-
return const CatalystNoopProfiler();
225+
return const CatalystProfiler.noop();
227226
}
228227

229228
void _debugPrintStressTest() {

catalyst_voices/apps/voices/lib/dependency/dependencies.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ final class Dependencies extends DependencyProvider {
4242
required ReportingService reportingService,
4343
CatalystProfiler? profiler,
4444
CatalystStartupProfiler? startupProfiler,
45-
CatalystRuntimeProfiler? runtimeProfiler,
4645
}) async {
4746
DependencyProvider.instance = this;
4847

@@ -56,9 +55,6 @@ final class Dependencies extends DependencyProvider {
5655
if (startupProfiler != null) {
5756
registerSingleton(startupProfiler);
5857
}
59-
if (runtimeProfiler != null) {
60-
registerSingleton(runtimeProfiler);
61-
}
6258

6359
_registerStorages();
6460
_registerUtils();
@@ -247,10 +243,11 @@ final class Dependencies extends DependencyProvider {
247243
return BlockchainRepository(get<ApiServices>());
248244
})
249245
..registerLazySingleton<SignedDocumentManager>(() {
246+
final profiler = get<CatalystProfiler>();
250247
return SignedDocumentManager(
251248
brotli: const CatalystBrotliCompressor(),
252249
zstd: const CatalystZstdCompressor(),
253-
profiler: get<CatalystRuntimeProfiler>(),
250+
profiler: profiler is CatalystConsoleProfiler ? profiler : const CatalystNoopProfiler(),
254251
);
255252
})
256253
..registerLazySingleton<DatabaseDraftsDataSource>(() {
@@ -261,6 +258,7 @@ final class Dependencies extends DependencyProvider {
261258
..registerLazySingleton<DatabaseDocumentsDataSource>(() {
262259
return DatabaseDocumentsDataSource(
263260
get<CatalystDatabase>(),
261+
get<CatalystProfiler>(),
264262
);
265263
})
266264
..registerLazySingleton<DocumentFavoriteSource>(() {
@@ -277,6 +275,7 @@ final class Dependencies extends DependencyProvider {
277275
..registerLazySingleton<CampaignRepository>(CampaignRepository.new)
278276
..registerLazySingleton<DocumentRepository>(() {
279277
return DocumentRepository(
278+
get<CatalystDatabase>(),
280279
get<DatabaseDraftsDataSource>(),
281280
get<DatabaseDocumentsDataSource>(),
282281
get<CatGatewayDocumentDataSource>(),
@@ -513,6 +512,7 @@ final class Dependencies extends DependencyProvider {
513512
get<SyncStatsStorage>(),
514513
get<DocumentsService>(),
515514
get<CampaignService>(),
515+
get<CatalystProfiler>(),
516516
);
517517
},
518518
dispose: (manager) async => manager.dispose(),

catalyst_voices/docs/performance/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ flutter run --target=lib/configs/main_web.dart \
1616
--dart-define=STRESS_TEST_PROPOSAL_INDEX_COUNT=0 \
1717
--dart-define=STRESS_TEST_DECOMPRESSED=false \
1818
--dart-define=STRESS_TEST_CLEAR_DB=true \
19+
--dart-define=CONSOLE_PROFILE=true \
1920
--web-port=5554 \
2021
--web-header=Cross-Origin-Opener-Policy=same-origin \
2122
--web-header=Cross-Origin-Embedder-Policy=require-corp
@@ -32,3 +33,10 @@ Be aware that number of produced documents will be higher then number of proposa
3233
* `STRESS_TEST_PROPOSAL_INDEX_COUNT`=1000, `STRESS_TEST_CLEAR_DB`=false
3334
* `STRESS_TEST_PROPOSAL_INDEX_COUNT`=2000, `STRESS_TEST_CLEAR_DB`=true
3435
* `STRESS_TEST_PROPOSAL_INDEX_COUNT`=2000, `STRESS_TEST_CLEAR_DB`=false
36+
37+
## Proposals Query
38+
39+
### Machine
40+
41+
Current results are captured on **MacBook Pro, OS Version 15.6.1 (24G90), M1 Pro, 32 GB**.
42+
Measurements from different machines should be in separate .csv files.
Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
1-
proposals_count,stored_docs_count,new_docs_count,compressed,avg_duration, PR, note
2-
100, ,0 ,583 ,true ,0:00:04.008009 ,- ,-
3-
100, ,559 ,548 ,true ,0:00:04.530291 ,- ,-
4-
1000, ,0 ,5479 ,true ,0:00:32.248981 ,- ,-
5-
1000, ,5398 ,5480 ,true ,0:00:51.579570 ,- ,-
6-
2000, ,0 ,10976 ,true ,0:01:30.453520 ,- ,Queries start to problem
7-
8-
100, ,0 ,712 ,true ,0:00:01.406726 ,#3555 ,-
9-
100, ,0 ,712 ,false ,0:00:01.182925 ,#3555 ,-
10-
100, ,712 ,704 ,true ,0:00:02.227715 ,#3555 ,-
11-
1000, ,0 ,7008 ,true ,0:00:09.487206 ,#3555 ,-
12-
1000, ,0 ,7008 ,false ,0:00:09.075270 ,#3555 ,-
13-
1000, ,7008 ,7000 ,true ,0:00:44.159021 ,#3555 ,-
14-
2000, ,0 ,14008 ,true ,0:00:19.701200 ,#3555 ,-
15-
2000, ,0 ,14008 ,false ,0:00:17.898250 ,#3555 ,-
16-
2000, ,14008 ,14000 ,true ,0:01:02.166005 ,#3555 ,Failed on count query
17-
18-
100, ,0 ,712 ,true ,0:00:00.942015 ,#3614 ,-
19-
100, ,0 ,712 ,false ,0:00:00.666475 ,#3614 ,-
20-
100, ,712 ,704 ,true ,0:00:01.007421 ,#3614 ,-
21-
1000, ,0 ,7008 ,true ,0:00:04.720250 ,#3614 ,-
22-
1000, ,0 ,7008 ,false ,0:00:03.808820 ,#3614 ,-
23-
1000, ,7008 ,7000 ,true ,0:00:04.811015 ,#3614 ,-
24-
2000, ,0 ,14008 ,true ,0:00:08.978641 ,#3614 ,-
25-
2000, ,0 ,14008 ,false ,0:00:07.245110 ,#3614 ,-
26-
2000, ,14008 ,14000 ,true ,0:00:09.089615 ,#3614 ,-
1+
proposals_count ,stored_docs_count ,new_docs_count ,compressed ,avg_duration ,PR ,note
2+
100 ,0 ,583 ,true ,0:00:04.008009 ,- ,-
3+
100 ,559 ,548 ,true ,0:00:04.530291 ,- ,-
4+
1000 ,0 ,5479 ,true ,0:00:32.248981 ,- ,-
5+
1000 ,5398 ,5480 ,true ,0:00:51.579570 ,- ,-
6+
2000 ,0 ,10976 ,true ,0:01:30.453520 ,- ,Queries start to problem
7+
100 ,0 ,712 ,true ,0:00:01.406726 ,#3555 ,-
8+
100 ,0 ,712 ,false ,0:00:01.182925 ,#3555 ,-
9+
100 ,712 ,704 ,true ,0:00:02.227715 ,#3555 ,-
10+
1000 ,0 ,7008 ,true ,0:00:09.487206 ,#3555 ,-
11+
1000 ,0 ,7008 ,false ,0:00:09.075270 ,#3555 ,-
12+
1000 ,7008 ,7000 ,true ,0:00:44.159021 ,#3555 ,-
13+
2000 ,0 ,14008 ,true ,0:00:19.701200 ,#3555 ,-
14+
2000 ,0 ,14008 ,false ,0:00:17.898250 ,#3555 ,-
15+
2000 ,14008 ,14000 ,true ,0:01:02.166005 ,#3555 ,Failed on count query
16+
100 ,0 ,712 ,true ,0:00:00.942015 ,#3614 ,-
17+
100 ,0 ,712 ,false ,0:00:00.666475 ,#3614 ,-
18+
100 ,712 ,704 ,true ,0:00:01.007421 ,#3614 ,-
19+
1000 ,0 ,7008 ,true ,0:00:04.720250 ,#3614 ,-
20+
1000 ,0 ,7008 ,false ,0:00:03.808820 ,#3614 ,-
21+
1000 ,7008 ,7000 ,true ,0:00:04.811015 ,#3614 ,-
22+
2000 ,0 ,14008 ,true ,0:00:08.978641 ,#3614 ,-
23+
2000 ,0 ,14008 ,false ,0:00:07.245110 ,#3614 ,-
24+
2000 ,14008 ,14000 ,true ,0:00:09.089615 ,#3614 ,-
25+
100 ,0 ,712 ,true ,0:00:00.906899 ,#3672 ,DocumentAuthors table (2x more db entries)
26+
100 ,0 ,712 ,false ,0:00:00.661565 ,#3672 ,-
27+
100 ,712 ,704 ,true ,0:00:01.160340 ,#3672 ,-
28+
1000 ,0 ,7008 ,true ,0:00:04.722740 ,#3672 ,-
29+
1000 ,0 ,7008 ,false ,0:00:03.891115 ,#3672 ,-
30+
1000 ,7008 ,7000 ,true ,0:00:05.157430 ,#3672 ,-
31+
2000 ,0 ,14008 ,true ,0:00:09.569875 ,#3672 ,-
32+
2000 ,0 ,14008 ,false ,0:00:07.510065 ,#3672 ,-
33+
2000 ,14008 ,14000 ,true ,0:00:09.254585 ,#3672 ,-
34+
100 ,0 ,712 ,true ,0:00:00.921730 ,#3622 ,wasm
35+
100 ,0 ,712 ,false ,0:00:00.676296 ,#3622 ,-
36+
100 ,712 ,704 ,true ,0:00:01.077855 ,#3622 ,-
37+
1000 ,0 ,7008 ,true ,0:00:04.164745 ,#3622 ,-
38+
1000 ,0 ,7008 ,false ,0:00:03.238630 ,#3622 ,-
39+
1000 ,7008 ,7000 ,true ,0:00:04.314010 ,#3622 ,-
40+
2000 ,0 ,14008 ,true ,0:00:07.858330 ,#3622 ,-
41+
2000 ,0 ,14008 ,false ,0:00:06.202460 ,#3622 ,-
42+
2000 ,14008 ,14000 ,true ,0:00:07.949531 ,#3622 ,-
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
docs_count ,filer ,avg_duration ,PR ,note
2+
712 ,categories ,0:00:00.264954 ,#3555 ,-
3+
712 ,categories:drafts ,0:00:00.188969 ,#3555 ,-
4+
712 ,categories:finals ,0:00:00.207445 ,#3555 ,-
5+
7008 ,categories ,0:00:01.416110 ,#3555 ,-
6+
7008 ,categories:drafts ,0:00:01.474370 ,#3555 ,-
7+
7008 ,categories:finals ,0:00:01.466851 ,#3555 ,-
8+
14008 ,categories ,0:00:04.123159 ,#3555 ,-
9+
14008 ,categories:drafts ,0:00:04.306970 ,#3555 ,-
10+
14008 ,categories:finals ,0:00:04.242760 ,#3555 ,-
11+
712 ,categories ,0:00:00.146675 ,#3614 ,-
12+
712 ,categories:drafts ,0:00:00.161375 ,#3614 ,-
13+
712 ,categories:finals ,0:00:00.175615 ,#3614 ,-
14+
7008 ,categories ,0:00:00.275420 ,#3614 ,-
15+
7008 ,categories:drafts ,0:00:00.343510 ,#3614 ,-
16+
7008 ,categories:finals ,0:00:00.392119 ,#3614 ,-
17+
14008 ,categories ,0:00:00.551765 ,#3614 ,-
18+
14008 ,categories:drafts ,0:00:00.692240 ,#3614 ,-
19+
14008 ,categories:finals ,0:00:00.832700 ,#3614 ,-
20+
712 ,categories ,0:00:00.072415 ,#3672 ,DocumentAuthors table (2x more db entries)
21+
712 ,categories:drafts ,0:00:00.081024 ,#3672 ,-
22+
712 ,categories:finals ,0:00:00.081195 ,#3672 ,-
23+
7008 ,categories ,0:00:00.116349 ,#3672 ,-
24+
7008 ,categories:drafts ,0:00:00.174726 ,#3672 ,-
25+
7008 ,categories:finals ,0:00:00.221865 ,#3672 ,-
26+
14008 ,categories ,0:00:00.189561 ,#3672 ,-
27+
14008 ,categories:drafts ,0:00:00.307680 ,#3672 ,-
28+
14008 ,categories:finals ,0:00:00.468149 ,#3672 ,-
29+
712 ,categories ,0:00:00.063385 ,#3622 ,wasm
30+
712 ,categories:drafts ,0:00:00.066660 ,#3622 ,-
31+
712 ,categories:finals ,0:00:00.071410 ,#3622 ,-
32+
7008 ,categories ,0:00:00.112590 ,#3622 ,-
33+
7008 ,categories:drafts ,0:00:00.160765 ,#3622 ,-
34+
7008 ,categories:finals ,0:00:00.216990 ,#3622 ,-
35+
14008 ,categories ,0:00:00.162824 ,#3622 ,-
36+
14008 ,categories:drafts ,0:00:00.278720 ,#3622 ,-
37+
14008 ,categories:finals ,0:00:00.439105 ,#3622 ,-
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
docs_count ,filer ,avg_duration ,PR ,note
2+
712 ,categories ,0:00:00.342165 ,#3555 ,-
3+
712 ,categories:drafts ,0:00:00.336929 ,#3555 ,-
4+
712 ,categories:finals ,0:00:00.347465 ,#3555 ,-
5+
7008 ,categories ,0:00:02.576425 ,#3555 ,-
6+
7008 ,categories:drafts ,0:00:02.642546 ,#3555 ,-
7+
7008 ,categories:finals ,0:00:02.626661 ,#3555 ,-
8+
14008 ,categories ,0:00:07.763035 ,#3555 ,-
9+
14008 ,categories:drafts ,0:00:07.942379 ,#3555 ,-
10+
14008 ,categories:finals ,0:00:07.895095 ,#3555 ,-
11+
712 ,categories ,0:00:00.130960 ,#3614 ,-
12+
712 ,categories:drafts ,0:00:00.134510 ,#3614 ,-
13+
712 ,categories:finals ,0:00:00.138945 ,#3614 ,-
14+
7008 ,categories ,0:00:00.220099 ,#3614 ,-
15+
7008 ,categories:drafts ,0:00:00.239930 ,#3614 ,-
16+
7008 ,categories:finals ,0:00:01.165869 ,#3614 ,-
17+
14008 ,categories ,0:00:00.372244 ,#3614 ,-
18+
14008 ,categories:drafts ,0:00:00.380780 ,#3614 ,-
19+
14008 ,categories:finals ,0:00:04.466084 ,#3614 ,-
20+
712 ,categories ,0:00:00.076324 ,#3672 ,DocumentAuthors table (2x more db entries)
21+
712 ,categories:drafts ,0:00:00.097465 ,#3672 ,-
22+
712 ,categories:finals ,0:00:00.094671 ,#3672 ,-
23+
7008 ,categories ,0:00:00.567814 ,#3672 ,-
24+
7008 ,categories:drafts ,0:00:00.474589 ,#3672 ,-
25+
7008 ,categories:finals ,0:00:01.290510 ,#3672 ,-
26+
14008 ,categories ,0:00:02.114651 ,#3672 ,-
27+
14008 ,categories:drafts ,0:00:01.690294 ,#3672 ,-
28+
14008 ,categories:finals ,0:00:05.336655 ,#3672 ,-
29+
712 ,categories ,0:00:00.134385 ,#3622 ,wasm
30+
712 ,categories:drafts ,0:00:00.132170 ,#3622 ,-
31+
712 ,categories:finals ,0:00:00.141990 ,#3622 ,-
32+
7008 ,categories ,0:00:00.654435 ,#3622 ,-
33+
7008 ,categories:drafts ,0:00:00.534680 ,#3622 ,-
34+
7008 ,categories:finals ,0:00:01.294485 ,#3622 ,-
35+
14008 ,categories ,0:00:02.108506 ,#3622 ,-
36+
14008 ,categories:drafts ,0:00:01.585000 ,#3622 ,-
37+
14008 ,categories:finals ,0:00:05.024950 ,#3622 ,-

catalyst_voices/packages/internal/catalyst_voices_models/lib/src/campaign/campaign_filters.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ final class CampaignFilters extends Equatable {
1515

1616
@override
1717
List<Object?> get props => [categoriesIds];
18+
19+
@override
20+
String toString() => 'CampaignFilters($categoriesIds)';
1821
}

catalyst_voices/packages/internal/catalyst_voices_models/lib/src/config/app_config.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class AppConfig extends Equatable {
2828
final SentryConfig sentry;
2929
final BlockchainConfig blockchain;
3030
final StressTestConfig stressTest;
31-
final CatalystDeveloperProfilerConfig developerProfiler;
31+
final CatalystDeveloperProfilerConfig profiler;
3232

3333
const AppConfig({
3434
required this.version,
@@ -37,7 +37,7 @@ final class AppConfig extends Equatable {
3737
required this.sentry,
3838
required this.blockchain,
3939
required this.stressTest,
40-
required this.developerProfiler,
40+
required this.profiler,
4141
});
4242

4343
AppConfig.dev()
@@ -69,7 +69,7 @@ final class AppConfig extends Equatable {
6969
slotNumberConfig: BlockchainSlotNumberConfig.testnet(),
7070
),
7171
stressTest: const StressTestConfig(),
72-
developerProfiler: const CatalystDeveloperProfilerConfig(),
72+
profiler: const CatalystDeveloperProfilerConfig(),
7373
);
7474

7575
factory AppConfig.env(AppEnvironmentType env) {
@@ -110,7 +110,7 @@ final class AppConfig extends Equatable {
110110
slotNumberConfig: BlockchainSlotNumberConfig.testnet(),
111111
),
112112
stressTest: const StressTestConfig(),
113-
developerProfiler: const CatalystDeveloperProfilerConfig(),
113+
profiler: const CatalystDeveloperProfilerConfig(),
114114
);
115115

116116
AppConfig.prod()
@@ -142,7 +142,7 @@ final class AppConfig extends Equatable {
142142
slotNumberConfig: BlockchainSlotNumberConfig.mainnet(),
143143
),
144144
stressTest: const StressTestConfig(),
145-
developerProfiler: const CatalystDeveloperProfilerConfig(),
145+
profiler: const CatalystDeveloperProfilerConfig(),
146146
);
147147

148148
@override
@@ -153,7 +153,7 @@ final class AppConfig extends Equatable {
153153
sentry,
154154
blockchain,
155155
stressTest,
156-
developerProfiler,
156+
profiler,
157157
];
158158

159159
AppConfig copyWith({
@@ -163,7 +163,7 @@ final class AppConfig extends Equatable {
163163
SentryConfig? sentry,
164164
BlockchainConfig? blockchain,
165165
StressTestConfig? stressTest,
166-
CatalystDeveloperProfilerConfig? developerProfiler,
166+
CatalystDeveloperProfilerConfig? profiler,
167167
}) {
168168
return AppConfig(
169169
version: version ?? this.version,
@@ -172,7 +172,7 @@ final class AppConfig extends Equatable {
172172
sentry: sentry ?? this.sentry,
173173
blockchain: blockchain ?? this.blockchain,
174174
stressTest: stressTest ?? this.stressTest,
175-
developerProfiler: developerProfiler ?? this.developerProfiler,
175+
profiler: profiler ?? this.profiler,
176176
);
177177
}
178178
}

catalyst_voices/packages/internal/catalyst_voices_models/lib/src/config/catalyst_developer_profiler_config.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ final class CatalystDeveloperProfilerConfig extends Equatable {
1818
bool get debugProfilePaintsEnabledConfig =>
1919
const bool.fromEnvironment('DEBUG_PROFILE_PAINTS_ENABLED');
2020

21+
bool get console => const bool.fromEnvironment('CONSOLE_PROFILE');
22+
2123
@override
2224
List<Object?> get props => [];
2325

@@ -28,7 +30,8 @@ final class CatalystDeveloperProfilerConfig extends Equatable {
2830
'debugProfileBuildsEnabledUserWidgetsConfig: $debugProfileBuildsEnabledUserWidgetsConfig, '
2931
'debugProfileDeveloperProfilerEnableAll: $debugProfileDeveloperProfilerEnableAll, '
3032
'debugProfileLayoutsEnabledConfig: $debugProfileLayoutsEnabledConfig, '
31-
'debugProfilePaintsEnabledConfig: $debugProfilePaintsEnabledConfig'
33+
'debugProfilePaintsEnabledConfig: $debugProfilePaintsEnabledConfig, '
34+
'console: $console'
3235
'}';
3336
}
3437
}

catalyst_voices/packages/internal/catalyst_voices_models/lib/src/document/data/document_data.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ final class DocumentData extends Equatable implements Comparable<DocumentData> {
3535
}
3636

3737
/// Update document data with a new [ref].
38-
DocumentData copyWithSelfRef({required DocumentRef selfRef}) {
38+
DocumentData copyWith({
39+
required DocumentRef selfRef,
40+
}) {
3941
return DocumentData(
4042
metadata: metadata.copyWith(selfRef: selfRef),
4143
content: content,

0 commit comments

Comments
 (0)