|
64 | 64 | inherit (project.hsPkgs.cardano-cli.components.exes) cardano-cli;
|
65 | 65 | })
|
66 | 66 |
|
67 |
| - (final: prev: { |
68 |
| - # The cardano-db-sync NixOS module (nix/nixos/cardano-db-sync-service.nix) |
69 |
| - # expects these to be here |
70 |
| - inherit (project.exes) |
71 |
| - cardano-db-sync |
72 |
| - cardano-db-tool |
73 |
| - cardano-smash-server; |
74 |
| - schema = ./schema; |
75 |
| - }) |
| 67 | + (final: prev: |
| 68 | + let |
| 69 | + profiled = project.profiled.exes; |
| 70 | + in { |
| 71 | + # The cardano-db-sync NixOS module (nix/nixos/cardano-db-sync-service.nix) |
| 72 | + # expects these to be here |
| 73 | + inherit (project.exes) |
| 74 | + cardano-db-sync |
| 75 | + cardano-db-tool |
| 76 | + cardano-smash-server; |
| 77 | + |
| 78 | + cardano-db-sync-profiled = profiled.cardano-db-sync; |
| 79 | + cardano-smash-server-profiled = profiled.cardano-smash-server; |
| 80 | + |
| 81 | + schema = ./schema; |
| 82 | + }) |
76 | 83 |
|
77 | 84 | (final: prev: {
|
78 | 85 | # HLint 3.2.x requires GHC >= 8.10 && < 9.0
|
|
251 | 258 | "cardano-db-tool.components.exes.cardano-db-tool"
|
252 | 259 | ] prev.hsPkgs;
|
253 | 260 | })
|
| 261 | + |
| 262 | + (final: prev: { |
| 263 | + profiled = final.appendModule { |
| 264 | + modules = [{ |
| 265 | + enableLibraryProfiling = true; |
| 266 | + enableProfiling = true; |
| 267 | + packages.cardano-db-sync.configureFlags = |
| 268 | + ["--ghc-option=-fprof-auto"]; |
| 269 | + packages.cardano-smash-server.configureFlags = |
| 270 | + ["--ghc-option=-fprof-auto"]; |
| 271 | + }]; |
| 272 | + }; |
| 273 | + }) |
254 | 274 | ];
|
255 | 275 |
|
256 | 276 | staticChecks =
|
|
319 | 339 | };
|
320 | 340 | inherit (docker) cardano-db-sync-docker cardano-smash-server-docker;
|
321 | 341 |
|
322 |
| - profiled = |
323 |
| - let |
324 |
| - projectProfiled = (project.appendModule { |
325 |
| - modules = [{ |
326 |
| - enableLibraryProfiling = true; |
327 |
| - enableProfiling = true; |
328 |
| - packages.cardano-db-sync.configureFlags = |
329 |
| - ["--ghc-option=-fprof-auto"]; |
330 |
| - packages.cardano-smash-server.configureFlags = |
331 |
| - ["--ghc-option=-fprof-auto"]; |
332 |
| - |
333 |
| - }]; |
334 |
| - }); |
335 |
| - in { |
336 |
| - inherit (projectProfiled.exes) cardano-db-sync cardano-smash-server; |
337 |
| - }; |
| 342 | + profiled = { |
| 343 | + inherit (project.profiled.exes) cardano-db-sync cardano-smash-server; |
| 344 | + }; |
338 | 345 |
|
339 | 346 | # TODO: macOS builders are resource-constrained and cannot run the detabase
|
340 | 347 | # integration tests. Add these back when we get beefier builders.
|
|
0 commit comments