1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 00:42:33 +03:00

Try using to get cmark timings

This commit is contained in:
Timothy Clem 2017-10-10 12:32:27 -07:00
parent 4a995bdec6
commit c6d665bd95

View File

@ -221,7 +221,10 @@ runParser Options{..} blob@Blob{..} = go
TreeSitterParser tslanguage ->
time "parse.tree_sitter_parse" languageTag $
liftIO (treeSitterParser tslanguage blob)
MarkdownParser -> pure (cmarkParser blobSource)
MarkdownParser ->
time "parse.cmark_parse" languageTag $
let term = cmarkParser blobSource
in length term `seq` pure term
blobFields = ("path", blobPath) : languageTag
languageTag = maybe [] (pure . (,) ("language" :: String) . show) blobLanguage
errors :: (Syntax.Error :< fs, Apply Foldable fs, Apply Functor fs) => Term (Union fs) (Record Assignment.Location) -> [Error.Error String]