Skip to content

Commit

Permalink
CAD-1073 bench: obtain db-sync logs
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire committed Jul 2, 2020
1 parent b8418fa commit e9d5033
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 31 deletions.
68 changes: 39 additions & 29 deletions globals-bench-txgen-simple.nix
Expand Up @@ -35,6 +35,37 @@ let
};
reportDeployment = x:
__trace "DEPLOYMENT_METADATA=${__toFile "nixops-metadata.json" (__toJSON metadata)}" x;

benchmarkingLogConfig = {
defaultScribes = [
[ "StdoutSK" "stdout" ]
[ "FileSK" "/var/lib/cardano-node/logs/node.json" ]
];
setupScribes = [
{
scKind = "StdoutSK";
scName = "stdout";
scFormat = "ScJson"; }
{
scKind = "FileSK";
scName = "/var/lib/cardano-node/logs/node.json";
scFormat = "ScJson";
scRotation = {
rpLogLimitBytes = 300000000;
rpMaxAgeHours = 24;
rpKeepFilesNum = 20;
}; }
];
minSeverity = "Debug";
TracingVerbosity = "MaximalVerbosity";
TurnOnLogMetrics = true;
options = {
mapBackends = {
"cardano.node-metrics" = [ "KatipBK" ];
};
};
};

in reportDeployment (rec {

networkName = "Benchmarking, size ${toString (__length benchmarkingTopology.coreNodes)}";
Expand Down Expand Up @@ -82,37 +113,16 @@ in reportDeployment (rec {
];
services.cardano-graphql.enable = pkgs.lib.mkForce false;
services.graphql-engine.enable = pkgs.lib.mkForce false;
services.cardano-db-sync = {
logConfig =
pkgs.iohkNix.cardanoLib.defaultExplorerLogConfig
// benchmarkingLogConfig;
};
};
coreNodes = map (n : n // {
services.cardano-node.nodeConfig = pkgs.globals.environmentConfig.nodeConfig // {
defaultScribes = [
[ "StdoutSK" "stdout" ]
[ "FileSK" "/var/lib/cardano-node/logs/node.json" ]
];
setupScribes = [
{
scKind = "StdoutSK";
scName = "stdout";
scFormat = "ScJson"; }
{
scKind = "FileSK";
scName = "/var/lib/cardano-node/logs/node.json";
scFormat = "ScJson";
scRotation = {
rpLogLimitBytes = 300000000;
rpMaxAgeHours = 24;
rpKeepFilesNum = 20;
}; }
];
minSeverity = "Debug";
TracingVerbosity = "MaximalVerbosity";
TurnOnLogMetrics = true;
options = {
mapBackends = {
"cardano.node-metrics" = [ "KatipBK" ];
};
};
};
services.cardano-node.nodeConfig =
pkgs.globals.environmentConfig.nodeConfig
// benchmarkingLogConfig;
}) (benchmarkingTopology.coreNodes or []);
};

Expand Down
3 changes: 1 addition & 2 deletions scripts/bench.sh
Expand Up @@ -355,8 +355,7 @@ fetch_systemd_unit_startup_logs() {
pushd "${dir}" >/dev/null || return 1

mkdir -p 'logs/startup/'
nixops ssh explorer \
"journalctl --boot 0 -u tx-generator | head -n 100" \
nixops ssh explorer "journalctl --boot 0 -u tx-generator | head -n 100" \
> 'logs/startup/unit-startup-generator.log'
nixops ssh explorer "journalctl --boot 0 -u cardano-node | head -n 100" \
> 'logs/startup/unit-startup-explorer.log'
Expand Down

0 comments on commit e9d5033

Please sign in to comment.