-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[perf] Fixes and improvements towards more interesting uses.
Motivated by the nice heatmap (PR #686) , we fix and improve perf data, in particular, we - we now send data for all the sentences, not only for the top 10 - we send data that takes into account the cached execution of the command - we include a client-side option to disable sending of this data, as it can be "large" for large files (not so much actually, but just in case) - we fix types.ts for Loc -> Range (seems to be a bug from the beginning) Co-authored-by: Ali Caglayan <alizter@gmail.com>
- Loading branch information
Showing
12 changed files
with
185 additions
and
62 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
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
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { Loc } from "../../lib/types"; | ||
|
||
export type LocP = { loc?: Loc }; | ||
|
||
// Note, this is for display, so we need to adjust for both lines and | ||
// columns to start at 1, hence the + 1 | ||
export function Loc({ loc }: LocP) { | ||
if (!loc) return null; | ||
let l1 = loc.line_nb + 1; | ||
let c1 = loc.bp - loc.bol_pos; | ||
let l2 = loc.line_nb_last + 1; | ||
let c2 = loc.ep - loc.bol_pos_last; | ||
let l1 = loc.line_nb; | ||
let c1 = loc.bp - loc.bol_pos + 1; | ||
let l2 = loc.line_nb_last; | ||
let c2 = loc.ep - loc.bol_pos_last + 1; | ||
|
||
return <span>{`l:${l1},c:${c1}--l:${l2},c:${c2}`}</span>; | ||
} |
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
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.