This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #629 from Parabeac/release/2.7.0
Release/2.7.0
- Loading branch information
Showing
57 changed files
with
1,055 additions
and
2,728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const RUN_PARABEAC = 'Run Parabeac'; | ||
|
||
/// Interpretation | ||
const INTERPRETATION = 'Interpretation'; | ||
const HANDLE_CHILDREN = 'Handle Children'; | ||
const INTERMEDIATE_SERVICES = 'Intermediate Services'; | ||
|
||
/// Generation | ||
const GENERATION = 'Generation'; | ||
const COMMAND_QUEUE = 'Command Queue'; | ||
const GEN_DRY_RUN = 'Gen AIT Dry Run'; | ||
const GEN_AIT = 'Gen AIT'; | ||
|
||
/// Misc | ||
const PRE_GEN = 'Pre Gen Tasks'; | ||
const POST_GEN = 'Post Gen Tasks'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import 'package:quick_log/quick_log.dart'; | ||
import 'package:sentry/sentry.dart'; | ||
|
||
/// Class that uses Sentry to log transactions. | ||
/// | ||
/// These transactions are meant to track performance throughout parabeac_core. | ||
class SentryService { | ||
static final _logger = Logger('$SentryService'); | ||
static var transactions = <String, ISentrySpan>{}; | ||
|
||
/// Starts a main transaction. | ||
/// | ||
/// The [id] is the unique name of the transaction. The [operation] is what is being performed. | ||
/// The optional [description] is used to provide more context on the [operation] within Sentry. | ||
static void startTransaction(String id, String operation, | ||
{String description}) { | ||
if (!transactions.containsKey(id)) { | ||
final transaction = | ||
Sentry.startTransaction(id, operation, description: description); | ||
|
||
transactions[id] = transaction; | ||
} else { | ||
_logger | ||
.error('Transaction $id already exists. Cannot start transaction.'); | ||
} | ||
} | ||
|
||
/// Starts a child transaction from a parent transaction with a unique [id]. | ||
/// | ||
/// The [id] refers to the `parent` transaction. | ||
/// The [operation] is what the `child` transaction is performing, and must be unique. | ||
/// The optional [description] is used to provide more context on the [operation] within Sentry. | ||
static void startChildTransactionFrom(String id, String operation, | ||
{String description}) { | ||
if (transactions.containsKey(id) && !transactions.containsKey(operation)) { | ||
final transaction = | ||
transactions[id].startChild(operation, description: description); | ||
|
||
transactions[operation] = transaction; | ||
} else { | ||
_logger.error( | ||
'Transaction \"$id\" does not exist or transaction \"$operation\" already exists. Cannot start child transaction.'); | ||
} | ||
} | ||
|
||
/// Finishes transaction with a unique [id]. | ||
static Future<void> finishTransaction(String id) async { | ||
if (transactions.containsKey(id)) { | ||
await transactions[id].finish(); | ||
transactions.remove(id); | ||
} else { | ||
_logger | ||
.error('Transaction $id does not exist. Cannot finish transaction.'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
lib/interpret_and_optimize/entities/inherited_material.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
lib/interpret_and_optimize/entities/inherited_scaffold.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
lib/interpret_and_optimize/entities/subclasses/pb_intermediate_node.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.