mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
Flamegraph: Fix inefficient regex generating error on some function names (#76377)
This commit is contained in:
parent
46dc898a87
commit
7329e2dc62
@ -112,9 +112,9 @@ export function getBarColorByDiff(
|
||||
// the language from the backend and use the right regex but right now we just try all of them from most to least
|
||||
// specific.
|
||||
const matchers = [
|
||||
['phpspy', /^(?<packageName>(.*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/],
|
||||
['pyspy', /^(?<packageName>(.*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/],
|
||||
['rbspy', /^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/],
|
||||
['phpspy', /^(?<packageName>([^\/]*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/],
|
||||
['pyspy', /^(?<packageName>([^\/]*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/],
|
||||
['rbspy', /^(?<packageName>([^\/]*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/],
|
||||
[
|
||||
'nodespy',
|
||||
/^(\.\/node_modules\/)?(?<packageName>[^/]*)(?<filename>.*\.?(jsx?|tsx?)?):(?<functionName>.*):(?<line_info>.*)$/,
|
||||
|
Loading…
Reference in New Issue
Block a user