1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:57:45 +00:00

Profiler: Standardize percentage formatting

This implements the same percentage formatting for the disassembly and
flamegraph views as we have for the profile model.
This commit is contained in:
Jelle Raaijmakers 2023-02-02 13:00:40 +01:00 committed by Andreas Kling
parent 5d1acdc455
commit f0f9d8f1e0
5 changed files with 43 additions and 21 deletions

View file

@ -14,10 +14,6 @@ namespace Profiler {
class Profile;
// Number of digits after the decimal point for sample percentages.
static constexpr int const number_of_percent_digits = 2;
static constexpr int const percent_digits_rounding = AK::pow(10, number_of_percent_digits);
class ProfileModel final : public GUI::Model {
public:
static NonnullRefPtr<ProfileModel> create(Profile& profile)