Profiling: Add color for .NET (#181126)

## Summary

Support for .NET was just recently added to Universal Profiling. This PR
adds a color to represent this interpreter in the flamegraph.

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
This commit is contained in:
Florian Lehner 2024-04-26 12:02:58 +02:00 committed by GitHub
parent 8a05b593f3
commit ea80debecc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 0 deletions

View file

@ -132,6 +132,7 @@ describe('getLanguageType', () => {
FrameType.Perl,
FrameType.Python,
FrameType.Ruby,
FrameType.DotNET,
].map((type) =>
it(`returns interpreted for ${type}`, () => {
expect(getLanguageType({ frameType: type })).toEqual('INTERPRETED');

View file

@ -33,6 +33,7 @@ export enum FrameType {
Perl,
JavaScript,
PHPJIT,
DotNET,
ErrorFlag = 0x80,
Error = 0xff,
}
@ -48,6 +49,7 @@ const frameTypeDescriptions = {
[FrameType.Perl]: 'Perl',
[FrameType.JavaScript]: 'JavaScript',
[FrameType.PHPJIT]: 'PHP JIT',
[FrameType.DotNET]: '.NET',
[FrameType.ErrorFlag]: 'ErrorFlag',
[FrameType.Error]: 'Error',
};

View file

@ -39,6 +39,7 @@ export const FRAME_TYPE_COLOR_MAP = {
[FrameType.Perl]: [0xf98bb9, 0xfaa2c7, 0xfbb9d5, 0xfdd1e3],
[FrameType.JavaScript]: [0xcbc3e3, 0xd5cfe8, 0xdfdbee, 0xeae7f3],
[FrameType.PHPJIT]: [0xccfc82, 0xd1fc8e, 0xd6fc9b, 0xdbfca7],
[FrameType.DotNET]: [0x7014eb, 0x7e2ced, 0x8d43ef, 0x9b5bf1],
[FrameType.ErrorFlag]: [0x0, 0x0, 0x0, 0x0], // This is a special case, it's not a real frame type
[FrameType.Error]: [0xfd8484, 0xfd9d9d, 0xfeb5b5, 0xfecece],
};