Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Profiling] Use CO2 and Cost values provided by the ES Profiling APIs #170612

Merged
merged 30 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6e44d0c
[Profiling] Adding total duration to Stacktraces and profiling APIs
cauemarcondes Nov 6, 2023
e245d44
Merge branch 'main' into profiling-co2-calc
cauemarcondes Nov 22, 2023
41fb381
adding annual co2 and cost to stacktraces
cauemarcondes Nov 22, 2023
3291866
get co2 and cost to stacktraces
cauemarcondes Nov 23, 2023
d354c28
adding new settings
cauemarcondes Nov 23, 2023
9032c18
using feature flag
cauemarcondes Nov 23, 2023
2960bd4
adding to flamegraph
cauemarcondes Nov 23, 2023
eb8ff6d
refactoring
cauemarcondes Nov 24, 2023
0590003
calc
cauemarcondes Nov 27, 2023
614dc83
removing feature flag
cauemarcondes Nov 27, 2023
cb2e8da
removing old code
cauemarcondes Nov 27, 2023
8961a39
refactoring
cauemarcondes Nov 27, 2023
8c8306a
adding new settings
cauemarcondes Nov 29, 2023
14fea5b
removing console
cauemarcondes Nov 29, 2023
40c0680
fixing diffs
cauemarcondes Nov 29, 2023
9951292
fixing tests
cauemarcondes Nov 29, 2023
549e0ec
Merge branch 'main' of github.com:elastic/kibana into profiling-co2-calc
cauemarcondes Nov 29, 2023
ddac4db
fixing ci
cauemarcondes Nov 29, 2023
9029af4
fixing threads
cauemarcondes Nov 30, 2023
02b063d
fixing tests
cauemarcondes Nov 30, 2023
5502868
Merge branch 'main' of github.com:elastic/kibana into profiling-co2-calc
cauemarcondes Nov 30, 2023
6514cde
fixing ts
cauemarcondes Nov 30, 2023
4179dd6
removing fields and console
cauemarcondes Dec 1, 2023
d0b4c4a
fixing infra flame
cauemarcondes Dec 1, 2023
466943b
Merge branch 'main' of github.com:elastic/kibana into profiling-co2-calc
cauemarcondes Dec 1, 2023
47091dc
removing settings from clients
cauemarcondes Dec 1, 2023
4cbcdc6
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Dec 1, 2023
73e64d4
removing fields
cauemarcondes Dec 1, 2023
6ea770e
Merge branch 'profiling-co2-calc' of github.com:cauemarcondes/kibana …
cauemarcondes Dec 1, 2023
a0b84fc
reverting changes
cauemarcondes Dec 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions packages/kbn-profiling-utils/common/__fixtures__/README.md

This file was deleted.

298 changes: 298 additions & 0 deletions packages/kbn-profiling-utils/common/__fixtures__/base_flamegraph.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { BaseFlameGraph } from '../flamegraph';

export const baseFlamegraph: BaseFlameGraph = {
Edges: [
[1],
[2],
[3],
[4],
[5],
[6],
[7],
[8],
[9],
[10],
[11],
[12],
[13],
[14],
[15],
[16],
[17],
[18],
[19],
[20],
[21],
[22],
[23],
[24],
[25],
[26],
[27],
[28],
[29],
[30],
[31],
[32],
[33],
[34],
[],
],
FileID: [
'',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'fwIcP8qXDOl7k0VhWU8z9Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
'5JfXt00O17Yra2Rwh8HT8Q',
],
FrameType: [
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4,
],
Inline: [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
],
ExeFilename: [
'',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'metricbeat',
'vmlinux',
'vmlinux',
'vmlinux',
'vmlinux',
'vmlinux',
'vmlinux',
'vmlinux',
'vmlinux',
'vmlinux',
'vmlinux',
'vmlinux',
],
AddressOrLine: [
0, 43443520, 67880745, 67881145, 53704110, 53704665, 53696841, 53697537, 53700683, 53696841,
52492674, 67626923, 67629380, 67630226, 51515812, 51512445, 51522994, 44606453, 43747101,
43699300, 43538916, 43547623, 42994898, 42994925, 14680216, 14356875, 3732840, 3732678, 3721714,
3719260, 3936007, 3897721, 4081162, 4458225, 1712873,
],
FunctionName: [
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'entry_SYSCALL_64_after_hwframe',
'do_syscall_64',
'__x64_sys_read',
'ksys_read',
'vfs_read',
'new_sync_read',
'seq_read_iter',
'm_show',
'show_mountinfo',
'kernfs_sop_show_path',
'cgroup_show_path',
],
FunctionOffset: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,
],
SourceFilename: [
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
],
SourceLine: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,
],
CountInclusive: [
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7,
],
CountExclusive: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 7,
],
AnnualCO2TonsInclusive: [
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
0.0013627551116480942, 0.0013627551116480942, 0.0013627551116480942,
],
AnnualCO2TonsExclusive: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0.0013627551116480942,
],
AnnualCostsUSDInclusive: [
61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492,
61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492,
61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492,
61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492,
61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492,
61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492,
61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492, 61.30240940376492,
],
AnnualCostsUSDExclusive: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 61.30240940376492,
],
Size: 35,
SamplingRate: 1,
SelfCPU: 7,
TotalCPU: 245,
SelfAnnualCO2Tons: 0.0013627551116480942,
TotalAnnualCO2Tons: 0.04769642890768329,
SelfAnnualCostsUSD: 61.30240940376492,
TotalAnnualCostsUSD: 2145.5843291317715,
TotalSamples: 7,
TotalSeconds: 4.980000019073486,
};
Loading