[SourceKit] Report number of instructions executed since SourceKit was started in statistics request

This can be used to measure how many instructions a request executes by retrieving the number of instructions executed since the process’s start before and after executing the request.
This commit is contained in:
Alex Hoppen
2021-05-20 16:19:10 +02:00
parent 7ce0e872b7
commit e8b5bcac1d
3 changed files with 9 additions and 1 deletions

View File

@@ -176,7 +176,7 @@ UID_KEYS = [
KEY('ExpressionLength', 'key.expression_length'),
KEY('ExpressionType', 'key.expression_type'),
KEY('CanonicalizeType', 'key.canonicalize_type'),
KEY('InternalDiagnostic', "key.internal_diagnostic"),
KEY('InternalDiagnostic', 'key.internal_diagnostic'),
KEY('VFSName', 'key.vfs.name'),
KEY('VFSOptions', 'key.vfs.options'),
KEY('Files', 'key.files'),
@@ -453,6 +453,7 @@ UID_KINDS = [
KIND('Unknown', 'source.syntacticrename.unknown'),
KIND('StatNumRequests', 'source.statistic.num-requests'),
KIND('StatNumSemaRequests', 'source.statistic.num-semantic-requests'),
KIND('StatInstructionCount', 'source.statistic.instruction-count'),
KIND('SyntaxTreeOff', 'source.syntaxtree.transfer.off'),
KIND('SyntaxTreeFull', 'source.syntaxtree.transfer.full'),
KIND('Swift', 'source.lang.swift'),