From c8c143e7741d2b93b589d770b64c265228293564 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Thu, 18 Aug 2016 13:05:30 -0700 Subject: SL-323: first pass at ripping out old updater --- indra/newview/tests/lllogininstance_test.cpp | 137 --------------------------- 1 file changed, 137 deletions(-) (limited to 'indra/newview/tests') diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 1b0334498e..b43aaeaa33 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -192,36 +192,6 @@ const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } void LLAppViewer::forceQuit(void) {} LLAppViewer * LLAppViewer::sInstance = 0; -//----------------------------------------------------------------------------- -#include "llupdaterservice.h" - -std::string const & LLUpdaterService::pumpName(void) -{ - static std::string wakka = "wakka wakka wakka"; - return wakka; -} -bool LLUpdaterService::updateReadyToInstall(void) { return false; } -void LLUpdaterService::initialize(const std::string& channel, - const std::string& version, - const std::string& platform, - const std::string& platform_version, - const unsigned char uniqueid[MD5HEX_STR_SIZE], - const bool& willing_to_test - ) {} - -void LLUpdaterService::setCheckPeriod(unsigned int seconds) {} -void LLUpdaterService::startChecking(bool install_if_ready) {} -void LLUpdaterService::stopChecking() {} -bool LLUpdaterService::isChecking() { return false; } -LLUpdaterService::eUpdaterState LLUpdaterService::getState() { return INITIAL; } -std::string LLUpdaterService::updatedVersion() { return ""; } - -bool llHashedUniqueID(unsigned char* id) -{ - memcpy( id, "66666666666666666666666666666666", MD5HEX_STR_SIZE ); - return true; -} - //----------------------------------------------------------------------------- #include "llnotifications.h" #include "llfloaterreg.h" @@ -338,7 +308,6 @@ namespace tut gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO); gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO); gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", LLControlVariable::PERSIST_NO); gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO); gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO); gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO); @@ -476,110 +445,4 @@ namespace tut logininstance->connect(test_uri, agentCredential); ensure_equals("Default for agree to tos", gLoginCreds["params"]["read_critical"].asBoolean(), false); } - - template<> template<> - void lllogininstance_object::test<3>() - { - set_test_name("Test Mandatory Update User Accepts"); - - // Part 1 - Mandatory Update, with User accepts response. - // Test connect with update needed. - logininstance->connect(agentCredential); - - ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); - - // Update needed failure response. - LLSD response; - response["state"] = "offline"; - response["change"] = "fail.login"; - response["progress"] = 0.0; - response["transfer_rate"] = 7; - response["data"]["reason"] = "update"; - gTestPump.post(response); - - ensure_equals("Notification added", notifications.addedCount(), 1); - - notifications.sendYesResponse(); - - ensure("Disconnected", !(logininstance->authSuccess())); - } - - template<> template<> - void lllogininstance_object::test<4>() - { - set_test_name("Test Mandatory Update User Decline"); - - // Test connect with update needed. - logininstance->connect(agentCredential); - - ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); - - // Update needed failure response. - LLSD response; - response["state"] = "offline"; - response["change"] = "fail.login"; - response["progress"] = 0.0; - response["transfer_rate"] = 7; - response["data"]["reason"] = "update"; - gTestPump.post(response); - - ensure_equals("Notification added", notifications.addedCount(), 1); - notifications.sendNoResponse(); - - ensure("Disconnected", !(logininstance->authSuccess())); - } - - template<> template<> - void lllogininstance_object::test<6>() - { - set_test_name("Test Optional Update User Accept"); - - // Part 3 - Mandatory Update, with bogus response. - // Test connect with update needed. - logininstance->connect(agentCredential); - - ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); - - // Update needed failure response. - LLSD response; - response["state"] = "offline"; - response["change"] = "fail.login"; - response["progress"] = 0.0; - response["transfer_rate"] = 7; - response["data"]["reason"] = "optional"; - gTestPump.post(response); - - ensure_equals("Notification added", notifications.addedCount(), 1); - notifications.sendYesResponse(); - - ensure("Disconnected", !(logininstance->authSuccess())); - } - - template<> template<> - void lllogininstance_object::test<7>() - { - set_test_name("Test Optional Update User Denies"); - - // Part 3 - Mandatory Update, with bogus response. - // Test connect with update needed. - logininstance->connect(agentCredential); - - ensure_equals("Default connect uri", gLoginURI, VIEWERLOGIN_URI); - - // Update needed failure response. - LLSD response; - response["state"] = "offline"; - response["change"] = "fail.login"; - response["progress"] = 0.0; - response["transfer_rate"] = 7; - response["data"]["reason"] = "optional"; - gTestPump.post(response); - - ensure_equals("Notification added", notifications.addedCount(), 1); - notifications.sendNoResponse(); - - // User skips, should be reconnecting. - ensure_equals("reconnect uri", gLoginURI, VIEWERLOGIN_URI); - ensure_equals("skipping optional update", gLoginCreds["params"]["skipoptional"].asBoolean(), true); - } } -- cgit v1.3 From 2699ef356aae4f31246ab6ccb6613676a2e2cc0f Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 22 Aug 2016 09:36:00 -0700 Subject: SL-323: ripping out old code completed --- indra/newview/CMakeLists.txt | 1 - indra/newview/tests/lllogininstance_test.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/tests') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7a0df8d207..999165528a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2300,7 +2300,6 @@ if (LL_TESTS) set_source_files_properties( lllogininstance.cpp - llhasheduniqueid.cpp PROPERTIES LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}" ) diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index b43aaeaa33..aa05897c0b 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -186,6 +186,13 @@ void LLUIColorTable::saveUserSettings(void)const {} #include "../llversioninfo.h" const std::string &LLVersionInfo::getVersion() { return VIEWERLOGIN_VERSION; } const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } +const int MD5HEX_STR_SIZE = 33; // char hex[MD5HEX_STR_SIZE]; with null + +bool llHashedUniqueID(unsigned char* id) +{ + memcpy( id, "66666666666666666666666666666666", MD5HEX_STR_SIZE ); + return true; +} //----------------------------------------------------------------------------- #include "../llappviewer.h" -- cgit v1.3 From 9ec3b1bb039bdb40fce6aee66ce68ce8cabfb785 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Wed, 1 Mar 2017 13:19:34 -0800 Subject: SL-321: fix merge removal of llhasheduniqueid from from llloginstance_test's include path --- indra/newview/tests/lllogininstance_test.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/tests') diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 55dcb83567..5397feeab8 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -31,6 +31,9 @@ #include "../llviewernetwork.h" #include "../lllogininstance.h" + // Needed for Auth Test + #include "../llhasheduniqueid.h" + // STL headers // std headers // external library headers -- cgit v1.3 From 49552a874c659a7e4864e276f4250d498676a559 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Wed, 1 Mar 2017 23:28:11 -0800 Subject: SL-321: remove redundant const declaration of MD5HEX_STR_SIZE in llversioninfo, remove extraneous python variable assignment in CMakeLists, run tests with INFO --- indra/cmake/run_build_test.py | 2 +- indra/newview/CMakeLists.txt | 2 -- indra/newview/tests/lllogininstance_test.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview/tests') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index f02c5e98b4..210e43b232 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -312,7 +312,7 @@ if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", dest="loglevel", action="store_const", - const=logging.DEBUG, default=logging.WARNING) + const=logging.DEBUG, default=logging.INFO) parser.add_argument("-D", "--define", dest="vars", default=[], action="append", metavar="VAR=value", help="Add VAR=value to the env variables defined") diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9badc95a72..fe360171fb 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1756,8 +1756,6 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/Debug/fmodexL.dll ) endif (FMODEX) - - get_filename_component(PYTHON_DIRECTORY ${PYTHON_EXECUTABLE} DIRECTORY) add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 5397feeab8..3b7ec48d61 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -190,7 +190,6 @@ void LLUIColorTable::saveUserSettings(void)const {} #include "../llversioninfo.h" const std::string &LLVersionInfo::getVersion() { return VIEWERLOGIN_VERSION; } const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } -const int MD5HEX_STR_SIZE = 33; // char hex[MD5HEX_STR_SIZE]; with null bool llHashedUniqueID(unsigned char* id) { -- cgit v1.3 From 9c5332b301c0e17cd0133944670f79fd485cf7fe Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 6 Mar 2017 14:43:57 -0800 Subject: SL-321: reintegration of autobuild as package, build changes for mac integration --- autobuild.xml | 46 ++++++++++++++++++++++++++++++ indra/newview/CMakeLists.txt | 1 + indra/newview/llversioninfo.cpp | 1 + indra/newview/tests/llversioninfo_test.cpp | 6 +++- indra/newview/viewer_manifest.py | 46 +++++++++++------------------- 5 files changed, 70 insertions(+), 30 deletions(-) (limited to 'indra/newview/tests') diff --git a/autobuild.xml b/autobuild.xml index a655c7cae2..2f7ad05ecd 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3023,6 +3023,52 @@ version 0.8.0.1 + viewer-manager + + copyright + Copyright (c) 2000-2012, Linden Research, Inc. + description + Linden Lab Viewer Management Process suite. + license + Proprietary + license_file + LICENSE + name + viewer-manager + platforms + + darwin64 + + archive + + hash + b7a7d155a70413bce9a7a25ad54c37e7 + url + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/3073/7235/viewer_manager-1.0-darwin64-503061.tar.bz2 + + name + darwin64 + + windows + + archive + + hash + 0c1a369a3e5ed6363a306e6135797851 + url + http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/3074/7241/viewer_manager-1.0-windows-503061.tar.bz2 + + name + windows + + + source + https://bitbucket.org/lindenlab/vmp-standalone + source_type + hg + version + 1.0 + vlc-bin copyright diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index fe360171fb..7a62d8baec 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -47,6 +47,7 @@ include(TemplateCheck) include(UI) include(UnixInstall) include(ViewerMiscLibs) +include(ViewerManager) include(VisualLeakDetector) include(ZLIB) include(URIPARSER) diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 375dce485d..bf9d98ee91 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -64,6 +64,7 @@ S32 LLVersionInfo::getPatch() //static S32 LLVersionInfo::getBuild() { + std::cout << "What we have IN llversioninfo: " << LL_VIEWER_VERSION_BUILD << std::endl; return LL_VIEWER_VERSION_BUILD; } diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp index f1f69f33f1..2f7a4e9601 100644 --- a/indra/newview/tests/llversioninfo_test.cpp +++ b/indra/newview/tests/llversioninfo_test.cpp @@ -29,6 +29,8 @@ #include "../llversioninfo.h" + #include + // LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The // macro expands to the string name of the channel, but without quotes. We // need to turn it into a quoted string. This macro trick does that. @@ -81,7 +83,9 @@ namespace tut template<> template<> void versioninfo_object_t::test<1>() - { + { + std::cout << "What we parsed from CMake: " << LL_VIEWER_VERSION_BUILD << std::endl; + std::cout << "What we get from llversioninfo: " << LLVersionInfo::getBuild() << std::endl; ensure_equals("Major version", LLVersionInfo::getMajor(), LL_VIEWER_VERSION_MAJOR); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 35d63c33fc..1dc178dcf8 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -223,7 +223,7 @@ class ViewerManifest(LLManifest): return channel_type def channel_variant_app_suffix(self): - # get any part of the compiled channel name after the CHANNEL_VENDOR_BASE + # get any part of the channel name after the CHANNEL_VENDOR_BASE suffix=self.channel_variant() # by ancient convention, we don't use Release in the app name if self.channel_type() == 'release': @@ -346,15 +346,12 @@ class WindowsManifest(ViewerManifest): if self.is_packaging_viewer(): # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) - # include the compiled launcher script so that it gets included in the file_list - self.path(src='%s/SL_Launcher.exe' % self.args['configuration'], dst="SL_Launcher.exe") # Plugin host application self.path2basename(os.path.join(os.pardir, 'llplugin', 'slplugin', self.args['configuration']), "slplugin.exe") - #note, launcher and friends do not need viewer_manifest in Windows as the scripts are compiled into executables # Get shared libs from the shared libs staging directory if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']), dst=""): @@ -709,28 +706,29 @@ class DarwinManifest(ViewerManifest): pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') relpkgdir = os.path.join(pkgdir, "lib", "release") debpkgdir = os.path.join(pkgdir, "lib", "debug") - llbasedir = os.path.join(pkgdir, os.pardir) + vmpdir = os.path.join(pkgdir, "VMP") + llbasedir = os.path.join(pkgdir, "VMP") if self.prefix(src="", dst="Contents"): # everything goes in Contents self.path("Info.plist", dst="Info.plist") # copy additional libs in /Contents/MacOS/ self.path(os.path.join(relpkgdir, "libndofdev.dylib"), dst="Resources/libndofdev.dylib") - self.path(os.path.join(relpkgdir, "libhunspell-1.3.0.dylib"), dst="Resources/libhunspell-1.3.0.dylib") + self.path(os.path.join(relpkgdir, "libhunspell-1.3.0.dylib"), dst="Resources/libhunspell-1.3.0.dylib") if self.prefix(dst="MacOS"): - self.path2basename("../viewer_components/updater/scripts/darwin", "*.py") #this copies over the python wrapper script, associated utilities and required libraries, see SL-321, SL-322 and SL-323 - self.path2basename("../viewer_components/manager","SL_Launcher") - self.path2basename("../viewer_components/manager","*.py") + self.path2basename(vmpdir,"SL_Launcher") + self.path2basename(vmpdir,"*.py") llbase_path = os.path.join(self.get_dst_prefix(),'llbase') if not os.path.exists(llbase_path): os.makedirs(llbase_path) + #before, we only needed llbase at build time. With VMP, we need it at run time. if self.prefix(dst="llbase"): - self.path2basename("../packages/llbase","*.py") - self.path2basename("../packages/llbase","_cllsd.so") + self.path2basename(llbasedir,"*.py") + self.path2basename(llbasedir,"_cllsd.so") self.end_prefix() - self.end_prefix() + self.end_prefix() # most everything goes in the Resources directory if self.prefix(src="", dst="Resources"): @@ -749,6 +747,12 @@ class DarwinManifest(ViewerManifest): self.path("secondlife.icns") self.end_prefix(icon_path) + #VMP Tkinter icons + if self.prefix("vmp_icons"): + self.path("*.png") + self.path("*.gif") + self.end_prefix("vmp_icons") + self.path("SecondLife.nib") # Translations @@ -773,12 +777,6 @@ class DarwinManifest(ViewerManifest): self.path("uk.lproj") self.path("zh-Hans.lproj") - #VMP icons - if self.prefix("vmp_icons"): - self.path("*.png") - self.path("*.gif") - self.end_prefix("vmp_icons") - def path_optional(src, dst): """ For a number of our self.path() calls, not only do we want @@ -1145,17 +1143,7 @@ class LinuxManifest(ViewerManifest): if self.prefix(src="", dst="bin"): self.path("secondlife-bin","do-not-directly-run-secondlife-bin") self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin") - self.path2basename("../llplugin/slplugin", "SLPlugin") - #this copies over the python wrapper script, associated utilities and required libraries, see SL-321, SL-322 and SL-323 - self.path2basename("../viewer_components/manager","SL_Launcher") - self.path2basename("../viewer_components/manager","*.py") - llbase_path = os.path.join(self.get_dst_prefix(),'llbase') - if not os.path.exists(llbase_path): - os.makedirs(llbase_path) - if self.prefix(dst="llbase"): - self.path2basename("../packages/llbase","*.py") - self.path2basename("../packages/llbase","_cllsd.so") - self.end_prefix() + self.path2basename("../llplugin/slplugin", "SLPlugin") self.end_prefix("bin") if self.prefix("res-sdl"): -- cgit v1.3 From 578e927641477bfbd032adbe7717fda45c0cc0ea Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 27 Feb 2017 14:52:08 -0500 Subject: SL-409 - viewer asset stats updates to distinguish http and udp fetches --- indra/newview/llviewerassetstats.cpp | 191 +++++++++++++----------- indra/newview/llviewerassetstats.h | 16 +- indra/newview/llviewerassetstorage.cpp | 29 ++-- indra/newview/tests/llviewerassetstats_test.cpp | 13 +- 4 files changed, 142 insertions(+), 107 deletions(-) (limited to 'indra/newview/tests') diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index 54ac29723f..012da212a9 100644 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -90,90 +90,32 @@ namespace LLViewerAssetStatsFF // - wearables (clothing, bodyparts) which directly affect // user experiences when they log in // - sounds - // - gestures + // - gestures, including animations // - everything else. // - llassert_always(50 == LLViewerAssetType::AT_COUNT); - // Multiple asset definitions are floating around so this requires some - // maintenance and attention. - static const EViewerAssetCategories asset_to_bin_map[LLViewerAssetType::AT_COUNT] = - { - EVACTextureTempHTTPGet, // (0) AT_TEXTURE - EVACSoundUDPGet, // AT_SOUND - EVACOtherGet, // AT_CALLINGCARD - EVACOtherGet, // AT_LANDMARK - EVACOtherGet, // AT_SCRIPT - EVACWearableUDPGet, // AT_CLOTHING - EVACOtherGet, // AT_OBJECT - EVACOtherGet, // AT_NOTECARD - EVACOtherGet, // AT_CATEGORY - EVACOtherGet, // AT_ROOT_CATEGORY - EVACOtherGet, // (10) AT_LSL_TEXT - EVACOtherGet, // AT_LSL_BYTECODE - EVACOtherGet, // AT_TEXTURE_TGA - EVACWearableUDPGet, // AT_BODYPART - EVACOtherGet, // AT_TRASH - EVACOtherGet, // AT_SNAPSHOT_CATEGORY - EVACOtherGet, // AT_LOST_AND_FOUND - EVACSoundUDPGet, // AT_SOUND_WAV - EVACOtherGet, // AT_IMAGE_TGA - EVACOtherGet, // AT_IMAGE_JPEG - EVACGestureUDPGet, // (20) AT_ANIMATION - EVACGestureUDPGet, // AT_GESTURE - EVACOtherGet, // AT_SIMSTATE - EVACOtherGet, // AT_FAVORITE - EVACOtherGet, // AT_LINK - EVACOtherGet, // AT_LINK_FOLDER - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // (30) - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // (40) - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // - EVACOtherGet, // AT_MESH - // (50) - }; - - if (at < 0 || at >= LLViewerAssetType::AT_COUNT) - { - return EVACOtherGet; - } - EViewerAssetCategories ret(asset_to_bin_map[at]); - if (EVACTextureTempHTTPGet == ret) - { - // Indexed with [is_temp][with_http] - static const EViewerAssetCategories texture_bin_map[2][2] = - { - { - EVACTextureNonTempUDPGet, - EVACTextureNonTempHTTPGet, - }, - { - EVACTextureTempUDPGet, - EVACTextureTempHTTPGet, - } - }; - - ret = texture_bin_map[is_temp][with_http]; - } + EViewerAssetCategories ret(EVACOtherGet); + switch (at) + { + case LLAssetType::AT_TEXTURE: + if (is_temp) + ret = with_http ? EVACTextureTempHTTPGet : EVACTextureTempUDPGet; + else + ret = with_http ? EVACTextureNonTempHTTPGet : EVACTextureNonTempUDPGet; + break; + case LLAssetType::AT_SOUND: + case LLAssetType::AT_SOUND_WAV: + ret = with_http ? EVACSoundHTTPGet : EVACSoundUDPGet; + break; + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + ret = with_http ? EVACWearableHTTPGet : EVACWearableUDPGet; + break; + case LLAssetType::AT_ANIMATION: + case LLAssetType::AT_GESTURE: + ret = with_http ? EVACGestureHTTPGet : EVACGestureUDPGet; + break; + } return ret; } @@ -185,12 +127,18 @@ namespace LLViewerAssetStatsFF "Number of texture asset http requests enqueued"), sEnqueueAssetRequestsNonTempTextureUDP ("enqueuedassetrequestsnontemptextureudp", "Number of texture asset udp requests enqueued"), + sEnqueuedAssetRequestsWearableHTTP ("enqueuedassetrequestswearablehttp", + "Number of wearable asset http requests enqueued"), sEnqueuedAssetRequestsWearableUdp ("enqueuedassetrequestswearableudp", - "Number of wearable asset requests enqueued"), + "Number of wearable asset udp requests enqueued"), + sEnqueuedAssetRequestsSoundHTTP ("enqueuedassetrequestssoundhttp", + "Number of sound asset http requests enqueued"), sEnqueuedAssetRequestsSoundUdp ("enqueuedassetrequestssoundudp", - "Number of sound asset requests enqueued"), + "Number of sound asset udp requests enqueued"), + sEnqueuedAssetRequestsGestureHTTP ("enqueuedassetrequestsgesturehttp", + "Number of gesture asset http requests enqueued"), sEnqueuedAssetRequestsGestureUdp ("enqueuedassetrequestsgestureudp", - "Number of gesture asset requests enqueued"), + "Number of gesture asset udp requests enqueued"), sEnqueuedAssetRequestsOther ("enqueuedassetrequestsother", "Number of other asset requests enqueued"); @@ -199,8 +147,11 @@ namespace LLViewerAssetStatsFF &sEnqueueAssetRequestsTempTextureUDP, &sEnqueueAssetRequestsNonTempTextureHTTP, &sEnqueueAssetRequestsNonTempTextureUDP, + &sEnqueuedAssetRequestsWearableHTTP, &sEnqueuedAssetRequestsWearableUdp, + &sEnqueuedAssetRequestsSoundHTTP, &sEnqueuedAssetRequestsSoundUdp, + &sEnqueuedAssetRequestsGestureHTTP, &sEnqueuedAssetRequestsGestureUdp, &sEnqueuedAssetRequestsOther }; @@ -213,12 +164,18 @@ namespace LLViewerAssetStatsFF "Number of texture asset http requests dequeued"), sDequeueAssetRequestsNonTempTextureUDP ("dequeuedassetrequestsnontemptextureudp", "Number of texture asset udp requests dequeued"), + sDequeuedAssetRequestsWearableHTTP ("dequeuedassetrequestswearablehttp", + "Number of wearable asset http requests dequeued"), sDequeuedAssetRequestsWearableUdp ("dequeuedassetrequestswearableudp", - "Number of wearable asset requests dequeued"), + "Number of wearable asset udp requests dequeued"), + sDequeuedAssetRequestsSoundHTTP ("dequeuedassetrequestssoundhttp", + "Number of sound asset http requests dequeued"), sDequeuedAssetRequestsSoundUdp ("dequeuedassetrequestssoundudp", - "Number of sound asset requests dequeued"), + "Number of sound asset udp requests dequeued"), + sDequeuedAssetRequestsGestureHTTP ("dequeuedassetrequestsgesturehttp", + "Number of gesture asset http requests dequeued"), sDequeuedAssetRequestsGestureUdp ("dequeuedassetrequestsgestureudp", - "Number of gesture asset requests dequeued"), + "Number of gesture asset udp requests dequeued"), sDequeuedAssetRequestsOther ("dequeuedassetrequestsother", "Number of other asset requests dequeued"); @@ -227,8 +184,11 @@ namespace LLViewerAssetStatsFF &sDequeueAssetRequestsTempTextureUDP, &sDequeueAssetRequestsNonTempTextureHTTP, &sDequeueAssetRequestsNonTempTextureUDP, + &sDequeuedAssetRequestsWearableHTTP, &sDequeuedAssetRequestsWearableUdp, + &sDequeuedAssetRequestsSoundHTTP, &sDequeuedAssetRequestsSoundUdp, + &sDequeuedAssetRequestsGestureHTTP, &sDequeuedAssetRequestsGestureUdp, &sDequeuedAssetRequestsOther }; @@ -241,12 +201,18 @@ namespace LLViewerAssetStatsFF "Time spent responding to texture asset http requests"), sResponseAssetRequestsNonTempTextureUDP ("assetresponsetimesnontemptextureudp", "Time spent responding to texture asset udp requests"), + sResponsedAssetRequestsWearableHTTP ("assetresponsetimeswearablehttp", + "Time spent responding to wearable asset http requests"), sResponsedAssetRequestsWearableUdp ("assetresponsetimeswearableudp", - "Time spent responding to wearable asset requests"), + "Time spent responding to wearable asset udp requests"), + sResponsedAssetRequestsSoundHTTP ("assetresponsetimessounduhttp", + "Time spent responding to sound asset http requests"), sResponsedAssetRequestsSoundUdp ("assetresponsetimessoundudp", - "Time spent responding to sound asset requests"), + "Time spent responding to sound asset udp requests"), + sResponsedAssetRequestsGestureHTTP ("assetresponsetimesgesturehttp", + "Time spent responding to gesture asset http requests"), sResponsedAssetRequestsGestureUdp ("assetresponsetimesgestureudp", - "Time spent responding to gesture asset requests"), + "Time spent responding to gesture asset udp requests"), sResponsedAssetRequestsOther ("assetresponsetimesother", "Time spent responding to other asset requests"); @@ -255,8 +221,11 @@ namespace LLViewerAssetStatsFF &sResponseAssetRequestsTempTextureUDP, &sResponseAssetRequestsNonTempTextureHTTP, &sResponseAssetRequestsNonTempTextureUDP, + &sResponsedAssetRequestsWearableHTTP, &sResponsedAssetRequestsWearableUdp, + &sResponsedAssetRequestsSoundHTTP, &sResponsedAssetRequestsSoundUdp, + &sResponsedAssetRequestsGestureHTTP, &sResponsedAssetRequestsGestureUdp, &sResponsedAssetRequestsOther }; @@ -415,6 +384,19 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) .resp_mean(rec.getMean(*sResponse[EVACTextureNonTempUDPGet]).value()); } + if (!compact_output + || rec.getSum(*sEnqueued[EVACWearableHTTPGet]) + || rec.getSum(*sDequeued[EVACWearableHTTPGet]) + || rec.getSum(*sResponse[EVACWearableHTTPGet]).value()) + { + r.get_wearable_http .enqueued((S32)rec.getSum(*sEnqueued[EVACWearableHTTPGet])) + .dequeued((S32)rec.getSum(*sDequeued[EVACWearableHTTPGet])) + .resp_count((S32)rec.getSum(*sResponse[EVACWearableHTTPGet]).value()) + .resp_min(rec.getMin(*sResponse[EVACWearableHTTPGet]).value()) + .resp_max(rec.getMax(*sResponse[EVACWearableHTTPGet]).value()) + .resp_mean(rec.getMean(*sResponse[EVACWearableHTTPGet]).value()); + } + if (!compact_output || rec.getSum(*sEnqueued[EVACWearableUDPGet]) || rec.getSum(*sDequeued[EVACWearableUDPGet]) @@ -428,6 +410,19 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) .resp_mean(rec.getMean(*sResponse[EVACWearableUDPGet]).value()); } + if (!compact_output + || rec.getSum(*sEnqueued[EVACSoundHTTPGet]) + || rec.getSum(*sDequeued[EVACSoundHTTPGet]) + || rec.getSum(*sResponse[EVACSoundHTTPGet]).value()) + { + r.get_sound_http.enqueued((S32)rec.getSum(*sEnqueued[EVACSoundHTTPGet])) + .dequeued((S32)rec.getSum(*sDequeued[EVACSoundHTTPGet])) + .resp_count((S32)rec.getSum(*sResponse[EVACSoundHTTPGet]).value()) + .resp_min(rec.getMin(*sResponse[EVACSoundHTTPGet]).value()) + .resp_max(rec.getMax(*sResponse[EVACSoundHTTPGet]).value()) + .resp_mean(rec.getMean(*sResponse[EVACSoundHTTPGet]).value()); + } + if (!compact_output || rec.getSum(*sEnqueued[EVACSoundUDPGet]) || rec.getSum(*sDequeued[EVACSoundUDPGet]) @@ -441,6 +436,19 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) .resp_mean(rec.getMean(*sResponse[EVACSoundUDPGet]).value()); } + if (!compact_output + || rec.getSum(*sEnqueued[EVACGestureHTTPGet]) + || rec.getSum(*sDequeued[EVACGestureHTTPGet]) + || rec.getSum(*sResponse[EVACGestureHTTPGet]).value()) + { + r.get_gesture_http .enqueued((S32)rec.getSum(*sEnqueued[EVACGestureHTTPGet])) + .dequeued((S32)rec.getSum(*sDequeued[EVACGestureHTTPGet])) + .resp_count((S32)rec.getSum(*sResponse[EVACGestureHTTPGet]).value()) + .resp_min(rec.getMin(*sResponse[EVACGestureHTTPGet]).value()) + .resp_max(rec.getMax(*sResponse[EVACGestureHTTPGet]).value()) + .resp_mean(rec.getMean(*sResponse[EVACGestureHTTPGet]).value()); + } + if (!compact_output || rec.getSum(*sEnqueued[EVACGestureUDPGet]) || rec.getSum(*sDequeued[EVACGestureUDPGet]) @@ -576,8 +584,11 @@ LLViewerAssetStats::RegionStats::RegionStats() get_texture_temp_udp("get_texture_temp_udp"), get_texture_non_temp_http("get_texture_non_temp_http"), get_texture_non_temp_udp("get_texture_non_temp_udp"), + get_wearable_http("get_wearable_http"), get_wearable_udp("get_wearable_udp"), + get_sound_http("get_sound_http"), get_sound_udp("get_sound_udp"), + get_gesture_http("get_gesture_http"), get_gesture_udp("get_gesture_udp"), get_other("get_other"), fps("fps"), diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index 9d425c82fc..ddddf7883b 100644 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -104,7 +104,7 @@ public: }; struct FPSStats : public LLInitParam::Block - { + { Mandatory count; Mandatory min, max, @@ -113,13 +113,16 @@ public: }; struct RegionStats : public LLInitParam::Block - { + { Optional 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_other; Optional fps; @@ -211,9 +214,12 @@ namespace LLViewerAssetStatsFF EVACTextureTempUDPGet, //< Texture GETs - temp/baked, UDP EVACTextureNonTempHTTPGet, //< Texture GETs - perm, HTTP EVACTextureNonTempUDPGet, //< Texture GETs - perm, UDP - EVACWearableUDPGet, //< Wearable GETs - EVACSoundUDPGet, //< Sound GETs - EVACGestureUDPGet, //< Gesture GETs + EVACWearableHTTPGet, //< Wearable GETs HTTP + EVACWearableUDPGet, //< Wearable GETs UDP + EVACSoundHTTPGet, //< Sound GETs HTTP + EVACSoundUDPGet, //< Sound GETs UDP + EVACGestureHTTPGet, //< Gesture GETs HTTP + EVACGestureUDPGet, //< Gesture GETs UDP EVACOtherGet, //< Other GETs EVACCount // Must be last diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 3bb2b531dc..347810e169 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -56,9 +56,10 @@ class LLViewerAssetRequest : public LLAssetRequest { public: - LLViewerAssetRequest(const LLUUID &uuid, const LLAssetType::EType type) + LLViewerAssetRequest(const LLUUID &uuid, const LLAssetType::EType type, bool with_http) : LLAssetRequest(uuid, type), - mMetricsStartTime(0) + mMetricsStartTime(0), + mWithHTTP(with_http) { } @@ -78,8 +79,8 @@ protected: { // Okay, it appears this request was used for useful things. Record // the expected dequeue and duration of request processing. - LLViewerAssetStatsFF::record_dequeue(mType, false, false); - LLViewerAssetStatsFF::record_response(mType, false, false, + LLViewerAssetStatsFF::record_dequeue(mType, mWithHTTP, false); + LLViewerAssetStatsFF::record_response(mType, mWithHTTP, false, (LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime)); mMetricsStartTime = (U32Seconds)0; @@ -88,6 +89,7 @@ protected: public: LLViewerAssetStats::duration_t mMetricsStartTime; + bool mWithHTTP; }; ///---------------------------------------------------------------------------- @@ -369,7 +371,8 @@ void LLViewerAssetStorage::queueRequestUDP( if (mUpstreamHost.isOk()) { // stash the callback info so we can find it after we get the response message - LLViewerAssetRequest *req = new LLViewerAssetRequest(uuid, atype); + bool with_http = false; + LLViewerAssetRequest *req = new LLViewerAssetRequest(uuid, atype, with_http); req->mDownCallback = callback; req->mUserData = user_data; req->mIsPriority = is_priority; @@ -398,7 +401,9 @@ void LLViewerAssetStorage::queueRequestUDP( LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(mUpstreamHost, LLTCT_ASSET); ttcp->requestTransfer(spa, tpvf, 100.f + (is_priority ? 1.f : 0.f)); - LLViewerAssetStatsFF::record_enqueue(atype, false, false); + bool with_http = false; + bool is_temp = false; + LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp); } } else @@ -432,7 +437,8 @@ void LLViewerAssetStorage::queueRequestHttp( { LL_DEBUGS("ViewerAsset") << "Will fetch via ViewerAsset cap " << cap_url << LL_ENDL; - LLViewerAssetRequest *req = new LLViewerAssetRequest(uuid, atype); + bool with_http = true; + LLViewerAssetRequest *req = new LLViewerAssetRequest(uuid, atype, with_http); req->mDownCallback = callback; req->mUserData = user_data; req->mIsPriority = is_priority; @@ -447,7 +453,9 @@ void LLViewerAssetStorage::queueRequestHttp( // This is the same as the current UDP logic - don't re-request a duplicate. if (!duplicate) { - LLViewerAssetStatsFF::record_enqueue(atype, false, false); + bool with_http = true; + bool is_temp = false; + LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp); LLCoros::instance().launch("LLViewerAssetStorage::assetRequestCoro", boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, uuid, atype, callback, user_data)); @@ -481,9 +489,9 @@ void LLViewerAssetStorage::assetRequestCoro( } else { - LL_DEBUGS("ViewerAsset") << "request succeeded" << LL_ENDL; + LL_DEBUGS("ViewerAsset") << "request succeeded, url " << url << LL_ENDL; - LL_DEBUGS("ViewerAsset") << "result: " << ll_pretty_print_sd(httpResults) << LL_ENDL; + // LL_DEBUGS("ViewerAsset") << "result: " << ll_pretty_print_sd(httpResults) << LL_ENDL; const LLSD::Binary &raw = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary(); @@ -508,6 +516,7 @@ void LLViewerAssetStorage::assetRequestCoro( else { // TODO asset-http: handle invalid size case + LL_ERRS() << "bad size" << LL_ENDL; } // Clean up pending downloads and trigger callbacks diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp index a08e32cb49..ed3051893e 100644 --- a/indra/newview/tests/llviewerassetstats_test.cpp +++ b/indra/newview/tests/llviewerassetstats_test.cpp @@ -76,8 +76,11 @@ static const char * all_keys[] = "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" }; @@ -88,8 +91,11 @@ static const char * resp_keys[] = "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" }; @@ -540,8 +546,11 @@ namespace tut ensure("sd[get_gesture_udp][enqueued] is 0", (0 == sd["get_gesture_udp"]["enqueued"].asInteger())); ensure("sd[get_gesture_udp][dequeued] is 0", (0 == sd["get_gesture_udp"]["dequeued"].asInteger())); - ensure("sd[get_wearable_udp][enqueued] is 4", (4 == sd["get_wearable_udp"]["enqueued"].asInteger())); - ensure("sd[get_wearable_udp][dequeued] is 4", (4 == sd["get_wearable_udp"]["dequeued"].asInteger())); + ensure("sd[get_wearable_http][enqueued] is 2", (2 == sd["get_wearable_http"]["enqueued"].asInteger())); + ensure("sd[get_wearable_http][dequeued] is 2", (2 == sd["get_wearable_http"]["dequeued"].asInteger())); + + ensure("sd[get_wearable_udp][enqueued] is 2", (2 == sd["get_wearable_udp"]["enqueued"].asInteger())); + ensure("sd[get_wearable_udp][dequeued] is 2", (2 == sd["get_wearable_udp"]["dequeued"].asInteger())); ensure("sd[get_other][enqueued] is 4", (4 == sd["get_other"]["enqueued"].asInteger())); ensure("sd[get_other][dequeued] is 0", (0 == sd["get_other"]["dequeued"].asInteger())); -- cgit v1.3 From bcd0453562e032ba1eed3858629bf8a554557543 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 2 Mar 2017 15:44:54 -0500 Subject: SL-409 - viewer asset stats test build fix --- indra/newview/tests/llviewerassetstats_test.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/newview/tests') diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp index ed3051893e..e2e7f09c3b 100644 --- a/indra/newview/tests/llviewerassetstats_test.cpp +++ b/indra/newview/tests/llviewerassetstats_test.cpp @@ -71,7 +71,8 @@ static const char * all_keys[] = { "duration", "fps", - "get_other", + "get_other_http", + "get_other_udp", "get_texture_temp_http", "get_texture_temp_udp", "get_texture_non_temp_http", @@ -86,7 +87,8 @@ static const char * all_keys[] = static const char * resp_keys[] = { - "get_other", + "get_other_http", + "get_other_udp", "get_texture_temp_http", "get_texture_temp_udp", "get_texture_non_temp_http", @@ -552,8 +554,11 @@ namespace tut ensure("sd[get_wearable_udp][enqueued] is 2", (2 == sd["get_wearable_udp"]["enqueued"].asInteger())); ensure("sd[get_wearable_udp][dequeued] is 2", (2 == sd["get_wearable_udp"]["dequeued"].asInteger())); - ensure("sd[get_other][enqueued] is 4", (4 == sd["get_other"]["enqueued"].asInteger())); - ensure("sd[get_other][dequeued] is 0", (0 == sd["get_other"]["dequeued"].asInteger())); + ensure("sd[get_other_http][enqueued] is 2", (2 == sd["get_other_http"]["enqueued"].asInteger())); + ensure("sd[get_other_http][dequeued] is 0", (0 == sd["get_other_http"]["dequeued"].asInteger())); + + ensure("sd[get_other_udp][enqueued] is 2", (2 == sd["get_other_udp"]["enqueued"].asInteger())); + ensure("sd[get_other_udp][dequeued] is 0", (0 == sd["get_other_udp"]["dequeued"].asInteger())); // Reset and check zeros... // Reset leaves current region in place -- cgit v1.3