Changeset View
Changeset View
Standalone View
Standalone View
source/tools/profiler2/profiler2.js
// Copyright (C) 2016 Wildfire Games. | // Copyright (C) 2021 Wildfire Games. | ||||
// | // | ||||
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy | ||||
// of this software and associated documentation files (the "Software"), to deal | // of this software and associated documentation files (the "Software"), to deal | ||||
// in the Software without restriction, including without limitation the rights | // in the Software without restriction, including without limitation the rights | ||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
// copies of the Software, and to permit persons to whom the Software is | // copies of the Software, and to permit persons to whom the Software is | ||||
// furnished to do so, subject to the following conditions: | // furnished to do so, subject to the following conditions: | ||||
// | // | ||||
▲ Show 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | for (let typeI in g_active_elements) | ||||
if (g_reports[rep].data().threads[g_main_thread].frames.length < frames_nb) | if (g_reports[rep].data().threads[g_main_thread].frames.length < frames_nb) | ||||
frames_nb = g_reports[rep].data().threads[g_main_thread].frames.length; | frames_nb = g_reports[rep].data().threads[g_main_thread].frames.length; | ||||
item_nb++; | item_nb++; | ||||
let data = get_history_data(rep, g_main_thread, g_active_elements[typeI]); | let data = get_history_data(rep, g_main_thread, g_active_elements[typeI]); | ||||
if (!document.getElementById('smooth').value) | if (!document.getElementById('smooth').value) | ||||
series_data[rep + "/" + g_active_elements[typeI]] = data.time_by_frame; | series_data[rep + "/" + g_active_elements[typeI]] = data.time_by_frame; | ||||
else | else | ||||
series_data[rep + "/" + g_active_elements[typeI]] = smooth_1D_array(data.time_by_frame, +document.getElementById('smooth').value); | series_data[rep + "/" + g_active_elements[typeI]] = smooth_1D_array(data.time_by_frame, +document.getElementById('smooth').value); | ||||
if (data.max > y_scale) | let max = Math.max(...series_data[rep + "/" + g_active_elements[typeI]].map(x => isNaN(x) ? 0 : x)); | ||||
Lint: indent: Expected indentation of 3 tabs but found 12 spaces. | |||||
Lint: indent Expected indentation of 3 tabs but found 12 spaces. Lint: indent: Expected indentation of 3 tabs but found 12 spaces. | |||||
y_scale = data.max; | if (max > y_scale) | ||||
Lint: indent Expected indentation of 3 tabs but found 12 spaces. Lint: indent: Expected indentation of 3 tabs but found 12 spaces. | |||||
Lint: indent Expected indentation of 3 tabs but found 12 spaces. Lint: indent: Expected indentation of 3 tabs but found 12 spaces. | |||||
y_scale = max; | |||||
Lint: indent Expected indentation of 4 tabs but found 16 spaces. Lint: indent: Expected indentation of 4 tabs but found 16 spaces. | |||||
Lint: indent Expected indentation of 4 tabs but found 16 spaces. Lint: indent: Expected indentation of 4 tabs but found 16 spaces. | |||||
if (use_log_scale === null && data.log_scale) | if (use_log_scale === null && data.log_scale) | ||||
use_log_scale = true; | use_log_scale = true; | ||||
} | } | ||||
} | } | ||||
if (use_log_scale) | if (use_log_scale) | ||||
{ | { | ||||
let legend_item = document.createElement("p"); | let legend_item = document.createElement("p"); | ||||
legend_item.style.borderColor = "transparent"; | legend_item.style.borderColor = "transparent"; | ||||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Expected indentation of 3 tabs but found 12 spaces.