Skip to content

Commit

Permalink
fix(frontend): fixes golang package name coloring (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
petethepig committed Dec 26, 2021
1 parent c176dac commit 6c390b5
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 22 deletions.
21 changes: 0 additions & 21 deletions cypress/integration/webapp/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,27 +351,6 @@ describe('basic test', () => {
});
});

describe('focus', () => {
it('it toggles when clicked again', () => {
cy.intercept('**/render*', {
fixture: 'simple-golang-app-cpu.json',
times: 1,
}).as('render');

cy.visit('/');

// click once once
cy.findByTestId('flamegraph-canvas').click(0, BAR_HEIGHT * 2);

// click again
cy.findByTestId('flamegraph-canvas').click(0, BAR_HEIGHT * 2);

cy.findByTestId('flamegraph-canvas').matchImageSnapshot(
`simple-golang-app-focus-toggle`
);
});
});

describe('contextmenu', () => {
it("it works when 'clear view' is clicked", () => {
cy.intercept('**/render*', {
Expand Down
Binary file modified cypress/snapshots/basic.ts/grafana-simple-golang-app-cpu.snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cypress/snapshots/basic.ts/pyroscope.server.cpu-table.snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified cypress/snapshots/lang-smoke.ts/comparison-go-1.snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cypress/snapshots/lang-smoke.ts/comparison-go-2.snap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ export function getPackageNameFromStackTrace(
default: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
dotnetspy: /^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/,
ebpfspy: /^(?<packageName>.+)$/,
gospy: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
// tested with pyroscope stacktraces here: https://regex101.com/r/99KReq/1
gospy: /^(?<packageName>.*?\/.*?\.|.*?\.|.+)(?<functionName>.*)$/,
phpspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/,
pyspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/,
rbspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/,
Expand Down

0 comments on commit 6c390b5

Please sign in to comment.