[Profiling] Add color for PHP JIT frames (#147495)

Signed-off-by: Florian Lehner <florian.lehner@elastic.cloud>

## Summary

Add a color for the PHP JIT frame type.

Signed-off-by: Florian Lehner <florian.lehner@elastic.cloud>
This commit is contained in:
Florian Lehner 2022-12-15 07:35:21 +01:00 committed by GitHub
parent 99344e44d4
commit e7f858bdbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ import { ElasticFlameGraph } from './flamegraph';
* 6 = Ruby
* 7 = Perl
* 8 = JavaScript
* 9 = PHP JIT
*
* This is most easily achieved by mapping frame types to different color variations, using
* the x-position we can use different colors for adjacent blocks while keeping a similar hue
@ -38,6 +39,7 @@ const frameTypeToColors = [
[0xd79ffc, 0xdfb2fd, 0xe7c5fd, 0xefd9fe],
[0xf98bb9, 0xfaa2c7, 0xfbb9d5, 0xfdd1e3],
[0xcbc3e3, 0xd5cfe8, 0xdfdbee, 0xeae7f3],
[0xccfc82, 0xd1fc8e, 0xd6fc9b, 0xdbfca7],
];
function frameTypeToRGB(frameType: number, x: number): number {