Skip to content

Commit

Permalink
Use consistent casing in tag names
Browse files Browse the repository at this point in the history
  • Loading branch information
safesparrow committed Oct 10, 2022
1 parent 4e23ca3 commit bca4a45
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Compiler/Driver/ParseAndCheckInputs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ let CheckOneInputAux
cancellable {
try
use _ =
Activity.Start "ParseAndCheckInputs.CheckOneInput" [| "inputName", inp.FileName |]
Activity.Start "ParseAndCheckInputs.CheckOneInput" [| "fileName", inp.FileName |]

CheckSimulateException tcConfig

Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Facilities/Logger.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Activity =

let private activitySource = new ActivitySource("fsc")

let Start name (tags:(string * #obj) seq) : IDisposable =
let Start name (tags:(string * string) seq) : IDisposable =
let act = activitySource.StartActivity(name)
for key,value in tags do
act.AddTag(key,value) |> ignore
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Facilities/Logger.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ module internal Activity =

val StartNoTags: name: string -> IDisposable

val Start: name: string -> tags: (string * #obj) seq -> IDisposable
val Start: name: string -> tags: (string * string) seq -> IDisposable
4 changes: 2 additions & 2 deletions src/Compiler/Service/FSharpCheckerResults.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2491,8 +2491,8 @@ module internal ParseAndCheckFile =
Activity.Start
"ParseAndCheckFile.CheckOneFile"
[|
"mainInputFileName", mainInputFileName
"Length", sourceText.Length.ToString()
"fileName", mainInputFileName
"length", sourceText.Length.ToString()
|]

let parsedMainInput = parseResults.ParseTree
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Service/IncrementalBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ type BoundModel private (tcConfig: TcConfig,
// Build symbol keys
let itemKeyStore, semanticClassification =
if enableBackgroundItemKeyStoreAndSemanticClassification then
use _ = Activity.Start "IncrementalBuild.CreateItemKeyStoreAndSemanticClassification" [|"fileName",fileName|]
use _ = Activity.Start "IncrementalBuild.CreateItemKeyStoreAndSemanticClassification" [|"fileName", fileName|]
let sResolutions = sink.GetResolutions()
let builder = ItemKeyStoreBuilder()
let preventDuplicates = HashSet({ new IEqualityComparer<struct(pos * pos)> with
Expand Down
12 changes: 6 additions & 6 deletions src/Compiler/Service/service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ type BackgroundCompiler
member _.ParseFile(fileName: string, sourceText: ISourceText, options: FSharpParsingOptions, cache: bool, userOpName: string) =
async {
use _ =
Activity.Start "BackgroundCompiler.ParseFile" [| "filename", fileName; "UserOpName", userOpName; "cache", cache.ToString() |]
Activity.Start "BackgroundCompiler.ParseFile" [| "fileName", fileName; "userOpName", userOpName; "cache", cache.ToString() |]

if cache then
let hash = sourceText.GetHashCode() |> int64
Expand All @@ -494,7 +494,7 @@ type BackgroundCompiler
member _.GetBackgroundParseResultsForFileInProject(fileName, options, userOpName) =
node {
use _ =
Activity.Start "BackgroundCompiler.GetBackgroundParseResultsForFileInProject" [| "filename", fileName; "UserOpName", userOpName |]
Activity.Start "BackgroundCompiler.GetBackgroundParseResultsForFileInProject" [| "fileName", fileName; "userOpName", userOpName |]

let! builderOpt, creationDiags = getOrCreateBuilder (options, userOpName)

Expand Down Expand Up @@ -523,7 +523,7 @@ type BackgroundCompiler

member _.GetCachedCheckFileResult(builder: IncrementalBuilder, fileName, sourceText: ISourceText, options) =
node {
use _ = Activity.Start "BackgroundCompiler.GetCachedCheckFileResult" [| "filename", fileName |]
use _ = Activity.Start "BackgroundCompiler.GetCachedCheckFileResult" [| "fileName", fileName |]
let hash = sourceText.GetHashCode() |> int64
let key = (fileName, hash, options)
let cachedResultsOpt = parseCacheLock.AcquireLock(fun ltok -> checkFileInProjectCache.TryGet(ltok, key))
Expand Down Expand Up @@ -630,9 +630,9 @@ type BackgroundCompiler
Activity.Start
"BackgroundCompiler.CheckFileInProjectAllowingStaleCachedResults"
[|
"Project", options.ProjectFileName
"filename", fileName
"UserOpName", userOpName
"project", options.ProjectFileName
"fileName", fileName
"userOpName", userOpName
|]

let! cachedResults =
Expand Down

0 comments on commit bca4a45

Please sign in to comment.