diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-29 07:43:28 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-29 07:56:09 +0300 |
commit | 1b68f71348ecf3983b76b40d7940da8377f049b7 (patch) | |
tree | 2974eddaef130a067c26033d60a59fc790365b3d /indra/newview/llviewerassetstats.h | |
parent | af4ea94efc1999f3b19fd8d643d0331f0b77e265 (diff) |
#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed
Diffstat (limited to 'indra/newview/llviewerassetstats.h')
-rw-r--r-- | indra/newview/llviewerassetstats.h | 250 |
1 files changed, 125 insertions, 125 deletions
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index 718c284224..de395da285 100644 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -1,31 +1,31 @@ -/** +/** * @file llviewerassetstats.h * @brief Client-side collection of asset request statistics * * $LicenseInfo:firstyear=2010&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ #ifndef LL_LLVIEWERASSETSTATUS_H -#define LL_LLVIEWERASSETSTATUS_H +#define LL_LLVIEWERASSETSTATUS_H #include "linden_common.h" @@ -41,25 +41,25 @@ namespace LLViewerAssetStatsFF { - enum EViewerAssetCategories - { - EVACTextureTempHTTPGet, //< Texture GETs - temp/baked, HTTP - EVACTextureTempUDPGet, //< Texture GETs - temp/baked, UDP - EVACTextureNonTempHTTPGet, //< Texture GETs - perm, HTTP - EVACTextureNonTempUDPGet, //< Texture GETs - perm, UDP - EVACWearableHTTPGet, //< Wearable GETs HTTP - EVACWearableUDPGet, //< Wearable GETs UDP - EVACSoundHTTPGet, //< Sound GETs HTTP - EVACSoundUDPGet, //< Sound GETs UDP - EVACGestureHTTPGet, //< Gesture GETs HTTP - EVACGestureUDPGet, //< Gesture GETs UDP - EVACLandmarkHTTPGet, //< Landmark GETs HTTP - EVACLandmarkUDPGet, //< Landmark GETs UDP - EVACOtherHTTPGet, //< Other GETs HTTP - EVACOtherUDPGet, //< Other GETs UDP - - EVACCount // Must be last - }; + enum EViewerAssetCategories + { + EVACTextureTempHTTPGet, //< Texture GETs - temp/baked, HTTP + EVACTextureTempUDPGet, //< Texture GETs - temp/baked, UDP + EVACTextureNonTempHTTPGet, //< Texture GETs - perm, HTTP + EVACTextureNonTempUDPGet, //< Texture GETs - perm, UDP + EVACWearableHTTPGet, //< Wearable GETs HTTP + EVACWearableUDPGet, //< Wearable GETs UDP + EVACSoundHTTPGet, //< Sound GETs HTTP + EVACSoundUDPGet, //< Sound GETs UDP + EVACGestureHTTPGet, //< Gesture GETs HTTP + EVACGestureUDPGet, //< Gesture GETs UDP + EVACLandmarkHTTPGet, //< Landmark GETs HTTP + EVACLandmarkUDPGet, //< Landmark GETs UDP + EVACOtherHTTPGet, //< Other GETs HTTP + EVACOtherUDPGet, //< Other GETs UDP + + EVACCount // Must be last + }; } /** @@ -101,125 +101,125 @@ namespace LLViewerAssetStatsFF class LLViewerAssetStats : public LLStopWatchControlsMixin<LLViewerAssetStats> { public: - /** - * Type for duration and other time values in the metrics. Selected - * for compatibility with the pre-existing timestamp on the texture - * fetcher class, LLTextureFetch. - */ - typedef U64Microseconds duration_t; - - /** - * Type for the region identifier used in stats. Currently uses - * the region handle's type (a U64) rather than the regions's LLUUID - * as the latter isn't available immediately. - */ - typedef U64 region_handle_t; - - struct AssetRequestType : public LLInitParam::Block<AssetRequestType> - { - Mandatory<S32> enqueued, - dequeued, - resp_count; - Mandatory<F64> resp_min, - resp_max, - resp_mean, - resp_mean_bytes; - - AssetRequestType(); - }; - - struct FPSStats : public LLInitParam::Block<FPSStats> + /** + * Type for duration and other time values in the metrics. Selected + * for compatibility with the pre-existing timestamp on the texture + * fetcher class, LLTextureFetch. + */ + typedef U64Microseconds duration_t; + + /** + * Type for the region identifier used in stats. Currently uses + * the region handle's type (a U64) rather than the regions's LLUUID + * as the latter isn't available immediately. + */ + typedef U64 region_handle_t; + + struct AssetRequestType : public LLInitParam::Block<AssetRequestType> { - Mandatory<S32> count; - Mandatory<F64> min, - max, - mean; - FPSStats(); - }; - - struct RegionStats : public LLInitParam::Block<RegionStats> + Mandatory<S32> enqueued, + dequeued, + resp_count; + Mandatory<F64> resp_min, + resp_max, + resp_mean, + resp_mean_bytes; + + AssetRequestType(); + }; + + struct FPSStats : public LLInitParam::Block<FPSStats> { - Optional<AssetRequestType> get_texture_temp_http, - get_texture_temp_udp, - get_texture_non_temp_http, - get_texture_non_temp_udp, - get_wearable_http, - get_wearable_udp, - get_sound_http, - get_sound_udp, - get_gesture_http, - get_gesture_udp, - get_landmark_http, - get_landmark_udp, - get_other_http, - get_other_udp; - Optional<FPSStats> fps; - Optional<S32> grid_x, - grid_y; - Optional<F64> duration; - - RegionStats(); - }; - - struct AssetStats : public LLInitParam::Block<AssetStats> - { - Multiple<RegionStats> regions; - Mandatory<F64> duration; - - Mandatory<LLUUID> session_id, - agent_id; - - Mandatory<std::string> message; - Mandatory<S32> sequence; - Mandatory<bool> initial, - break_; - - AssetStats(); - }; + Mandatory<S32> count; + Mandatory<F64> min, + max, + mean; + FPSStats(); + }; + + struct RegionStats : public LLInitParam::Block<RegionStats> + { + Optional<AssetRequestType> get_texture_temp_http, + get_texture_temp_udp, + get_texture_non_temp_http, + get_texture_non_temp_udp, + get_wearable_http, + get_wearable_udp, + get_sound_http, + get_sound_udp, + get_gesture_http, + get_gesture_udp, + get_landmark_http, + get_landmark_udp, + get_other_http, + get_other_udp; + Optional<FPSStats> fps; + Optional<S32> grid_x, + grid_y; + Optional<F64> duration; + + RegionStats(); + }; + + struct AssetStats : public LLInitParam::Block<AssetStats> + { + Multiple<RegionStats> regions; + Mandatory<F64> duration; + + Mandatory<LLUUID> session_id, + agent_id; + + Mandatory<std::string> message; + Mandatory<S32> sequence; + Mandatory<bool> initial, + break_; + + AssetStats(); + }; public: - LLViewerAssetStats(); - LLViewerAssetStats(const LLViewerAssetStats &); + LLViewerAssetStats(); + LLViewerAssetStats(const LLViewerAssetStats &); - // Default destructor is correct. - LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined + // Default destructor is correct. + LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined - // Clear all metrics data. This leaves the currently-active region - // in place but with zero'd data for all metrics. All other regions - // are removed from the collection map. - void reset(); + // Clear all metrics data. This leaves the currently-active region + // in place but with zero'd data for all metrics. All other regions + // are removed from the collection map. + void reset(); - // Set hidden region argument and establish context for subsequent - // collection calls. - void setRegion(region_handle_t region_handle); + // Set hidden region argument and establish context for subsequent + // collection calls. + void setRegion(region_handle_t region_handle); - // Retrieve current metrics for all visited regions (NULL region UUID/handle excluded) + // Retrieve current metrics for all visited regions (NULL region UUID/handle excluded) // Uses AssetStats structure seen above - void getStats(AssetStats& stats, bool compact_output); + void getStats(AssetStats& stats, bool compact_output); // Retrieve a single asset request type (taken from a single region) template <typename T> void getStat(LLTrace::Recording& rec, T& req, LLViewerAssetStatsFF::EViewerAssetCategories cat, bool compact_output); - LLSD asLLSD(bool compact_output); + LLSD asLLSD(bool compact_output); protected: - void handleStart(); - void handleStop(); - void handleReset(); + void handleStart(); + void handleStop(); + void handleReset(); - typedef std::map<region_handle_t, LLTrace::Recording > PerRegionRecordingContainer; + typedef std::map<region_handle_t, LLTrace::Recording > PerRegionRecordingContainer; - // Region of the currently-active region. Always valid but may - // be zero after construction or when explicitly set. Unchanged - // by a reset() call. - region_handle_t mRegionHandle; + // Region of the currently-active region. Always valid but may + // be zero after construction or when explicitly set. Unchanged + // by a reset() call. + region_handle_t mRegionHandle; - // Pointer to metrics collection for currently-active region. - LLTrace::Recording* mCurRecording; + // Pointer to metrics collection for currently-active region. + LLTrace::Recording* mCurRecording; - // Metrics data for all regions during one collection cycle - PerRegionRecordingContainer mRegionRecordings; + // Metrics data for all regions during one collection cycle + PerRegionRecordingContainer mRegionRecordings; }; @@ -260,7 +260,7 @@ void cleanup(); */ inline LLViewerAssetStats::duration_t get_timestamp() { - return LLTimer::getTotalTime(); + return LLTimer::getTotalTime(); } /** |