Skip to content

Commit

Permalink
Merge branch 'master' into ts-bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK authored Sep 9, 2024
2 parents 3d17c52 + f90b1f5 commit 7275503
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/full_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ jobs:
echo "const nanoNowNodesApiKey = '';" >> cw_nano/lib/.secrets.g.dart
echo "const tronGridApiKey = '';" >> cw_tron/lib/.secrets.g.dart
echo "const tronNowNodesApiKey = '';" >> cw_tron/lib/.secrets.g.dart
echo "const stealthExBearerToken = '';" >> lib/.secrets.g.dart
echo "const stealthExAdditionalFeePercent = '';" >> lib/.secrets.g.dart
- name: Rename app
run: |
Expand Down
2 changes: 1 addition & 1 deletion external/libzmq
Submodule libzmq updated 2 files
+7 −7 doc/zmq_socket.adoc
+28 −10 src/ip.cpp
34 changes: 28 additions & 6 deletions impls/monero.dart/lib/monero.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,36 @@ final Stopwatch sw = Stopwatch()..start();
bool printStarts = false;

void Function(String call)? debugStart = (call) {
if (printStarts) print("MONERO: $call");
debugCallLength[call] ??= <int>[];
debugCallLength[call]!.add(sw.elapsedMicroseconds);
try {
if (printStarts) print("MONERO: $call");
debugCallLength[call] ??= <int>[];
debugCallLength[call]!.add(sw.elapsedMicroseconds);
} catch (e) {}
};
void debugChores() {
for (var key in debugCallLength.keys) {
if (debugCallLength[key]!.length > 1000000) {
final elm =
debugCallLength[key]!.reduce((value, element) => value + element);
debugCallLength[key]!.clear();
debugCallLength["${key}_1M"] ??= <int>[];
debugCallLength["${key}_1M"]!.add(elm);
}
}
}

int debugCount = 0;

void Function(String call)? debugEnd = (call) {
final id = debugCallLength[call]!.length - 1;
debugCallLength[call]![id] =
sw.elapsedMicroseconds - debugCallLength[call]![id];
try {
final id = debugCallLength[call]!.length - 1;
if (++debugCount > 1000000) {
debugCount = 0;
debugChores();
}
debugCallLength[call]![id] =
sw.elapsedMicroseconds - debugCallLength[call]![id];
} catch (e) {}
};
void Function(String call, dynamic error)? errorHandler = (call, error) {
print("$call: $error");
Expand Down
34 changes: 28 additions & 6 deletions impls/monero.dart/lib/wownero.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,36 @@ final Stopwatch sw = Stopwatch()..start();
bool printStarts = false;

void Function(String call)? debugStart = (call) {
if (printStarts) print("MONERO: $call");
debugCallLength[call] ??= <int>[];
debugCallLength[call]!.add(sw.elapsedMicroseconds);
try {
if (printStarts) print("MONERO: $call");
debugCallLength[call] ??= <int>[];
debugCallLength[call]!.add(sw.elapsedMicroseconds);
} catch (e) {}
};
void debugChores() {
for (var key in debugCallLength.keys) {
if (debugCallLength[key]!.length > 1000000) {
final elm =
debugCallLength[key]!.reduce((value, element) => value + element);
debugCallLength[key]!.clear();
debugCallLength["${key}_1M"] ??= <int>[];
debugCallLength["${key}_1M"]!.add(elm);
}
}
}

int debugCount = 0;

void Function(String call)? debugEnd = (call) {
final id = debugCallLength[call]!.length - 1;
debugCallLength[call]![id] =
sw.elapsedMicroseconds - debugCallLength[call]![id];
try {
final id = debugCallLength[call]!.length - 1;
if (++debugCount > 1000000) {
debugCount = 0;
debugChores();
}
debugCallLength[call]![id] =
sw.elapsedMicroseconds - debugCallLength[call]![id];
} catch (e) {}
};
void Function(String call, dynamic error)? errorHandler = (call, error) {
print("$call: $error");
Expand Down
2 changes: 1 addition & 1 deletion impls/monero.dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ dependencies:
dev_dependencies:
lints: ^4.0.0
test: ^1.24.0
ffigen: ^13.0.0
ffigen: ^14.0.0

0 comments on commit 7275503

Please sign in to comment.