Removes unused files from LuaIDE, Telemetry is not being used, the only ebus called is Initialized, but no "LogEvents are being called.

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-12-15 11:53:26 -08:00
parent d624381885
commit 92d77c2b4a
11 changed files with 1 additions and 383 deletions
@@ -1,27 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef BASICSCRIPTCHECKER_H
#define BASICSCRIPTCHECKER_H
#include <AzCore/base.h>
#include <AzCore/Memory/SystemAllocator.h>
namespace LUAEditor
{
class BasicScriptChecker
{
public:
AZ_CLASS_ALLOCATOR(BasicScriptChecker, AZ::SystemAllocator, 0);
// eat a script and export any errors:
void ConsumeScript (
};
}
#endif
@@ -1,35 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef LUADEBUGGER_API_H
#define LUADEBUGGER_API_H
#include <AzCore/base.h>
#include <AzCore/EBus/EBus.h>
#pragma once
namespace LUADebugger
{
class Messages
: public AZ::EBusTraits
{
public:
//////////////////////////////////////////////////////////////////////////
// Bus configuration
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; // we have one bus that we always broadcast to
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ:: EBusHandlerPolicy::Multiple; // we can have multiple listeners.
//////////////////////////////////////////////////////////////////////////
typedef AZ::EBus<Messages> Bus;
typedef Bus::Handler Handler;
virtual ~Messages() {}
};
};
#endif//LUADEBUGGER_API_H
@@ -1,15 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzCore/Serialization/SerializeContext.h>
#include "LUATargetContextTrackerMessages.h"
namespace LUAEditor
{
}
@@ -1,40 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef SCRIPTCHECKER_H
#define SCRIPTCHECKER_H
#include <AzCore/base.h>
#include <AzCore/EBus/EBus.h>
namespace LUAEditor
{
class ScriptCheckerRequests
: public AZ::EBusTraits
{
public:
//////////////////////////////////////////////////////////////////////////
// Bus configuration
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ:: EBusHandlerPolicy::Single;
//////////////////////////////////////////////////////////////////////////
typedef AZ::EBus<ScriptCheckerRequests> Bus;
typedef Bus::Handler Handler;
virtual void StartScriptingCheck(const BreakpointMap& uniqueBreakpoints) = 0;
virtual void BreakpointHit(const Breakpoint& bp) = 0;
virtual void BreakpointResume() = 0;
virtual ~ScriptCheckerRequests() {}
};
}
#pragma once
#endif
@@ -8,9 +8,6 @@
#include "StandaloneToolsApplication.h"
#include <Source/Telemetry/TelemetryComponent.h>
#include <Source/Telemetry/TelemetryBus.h>
#include <AzCore/std/containers/array.h>
#include <AzCore/UserSettings/UserSettingsComponent.h>
#include <AzFramework/Asset/AssetCatalogComponent.h>
@@ -38,7 +35,6 @@ namespace StandaloneTools
{
LegacyFramework::Application::RegisterCoreComponents();
RegisterComponentDescriptor(Telemetry::TelemetryComponent::CreateDescriptor());
RegisterComponentDescriptor(LegacyFramework::IPCComponent::CreateDescriptor());
RegisterComponentDescriptor(AZ::UserSettingsComponent::CreateDescriptor());
@@ -62,7 +58,6 @@ namespace StandaloneTools
EnsureComponentCreated(AZ::StreamerComponent::RTTI_Type());
EnsureComponentCreated(AZ::JobManagerComponent::RTTI_Type());
EnsureComponentCreated(Telemetry::TelemetryComponent::RTTI_Type());
EnsureComponentCreated(AzFramework::TargetManagementComponent::RTTI_Type());
EnsureComponentCreated(LegacyFramework::IPCComponent::RTTI_Type());
@@ -90,14 +85,8 @@ namespace StandaloneTools
void BaseApplication::OnApplicationEntityActivated()
{
const int k_processIntervalInSecs = 2;
const bool doSDKInitShutdown = true;
EBUS_EVENT(Telemetry::TelemetryEventsBus, Initialize, "O3DE_IDE", k_processIntervalInSecs, doSDKInitShutdown);
bool launched = LaunchDiscoveryService();
[[maybe_unused]] bool launched = LaunchDiscoveryService();
AZ_Warning("EditorApplication", launched, "Could not launch GridHub; Only replay is available.");
(void)launched;
}
void BaseApplication::SetSettingsRegistrySpecializations(AZ::SettingsRegistryInterface::Specializations& specializations)
@@ -1,31 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#ifndef TELEMETRY_TELEMETRYBUS_H
#define TELEMETRY_TELEMETRYBUS_H
#include <AzCore/EBus/EBus.h>
#include "Source/Telemetry/TelemetryEvent.h"
namespace Telemetry
{
class TelemetryComponent;
class TelemetryEvents
: public AZ::EBusTraits
{
public:
virtual void Initialize(const char* applicationName, AZ::u32 processIntervalInSecs, bool doSDKInitShutdown) = 0;
virtual void LogEvent(const TelemetryEvent& event) = 0;
virtual void Shutdown() = 0;
};
typedef AZ::EBus<TelemetryEvents> TelemetryEventsBus;
}
#endif
@@ -1,48 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "TelemetryComponent.h"
#include <AzCore/Serialization/SerializeContext.h>
namespace Telemetry
{
void TelemetryComponent::Reflect(AZ::ReflectContext* context)
{
AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context);
if (serialize)
{
serialize->Class<TelemetryComponent, AZ::Component>()
->Version(1)
;
}
}
void TelemetryComponent::Activate()
{
TelemetryEventsBus::Handler::BusConnect();
}
void TelemetryComponent::Deactivate()
{
Shutdown();
TelemetryEventsBus::Handler::BusDisconnect();
}
void TelemetryComponent::Initialize([[maybe_unused]] const char* applicationName, [[maybe_unused]] AZ::u32 processInterval, [[maybe_unused]] bool doAPIInitShutdown)
{
}
void TelemetryComponent::LogEvent([[maybe_unused]] const TelemetryEvent& telemetryEvent)
{
}
void TelemetryComponent::Shutdown()
{
}
}
@@ -1,41 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/Component/Component.h>
#include <AzCore/std/chrono/chrono.h>
#include "TelemetryBus.h"
namespace Telemetry
{
class TelemetryComponent
: public AZ::Component
, public TelemetryEventsBus::Handler
{
public:
AZ_COMPONENT(TelemetryComponent, "{CE41EE3C-AF98-4B22-BA7C-2D425D1F468A}")
TelemetryComponent() = default;
//////////////////
// AZ::Component
void Activate() override;
void Deactivate() override;
static void Reflect(AZ::ReflectContext* context);
//////////////////
//////////////////////////////////////////
// Telemetry::TelemetryEventBus::Handler
void Initialize(const char* applicationName, AZ::u32 processIntervalInSeconds, bool doSDKInitShutdown) override;
void LogEvent(const TelemetryEvent& event) override;
void Shutdown() override;
//////////////////////////////////////////
};
}
@@ -1,80 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "TelemetryEvent.h"
#include "TelemetryBus.h"
namespace Telemetry
{
TelemetryEvent::TelemetryEvent(const char* eventName)
: m_eventName(eventName)
{
}
void TelemetryEvent::SetAttribute(const AZStd::string& name, const AZStd::string& value)
{
m_attributes[name] = value;
}
const AZStd::string& TelemetryEvent::GetAttribute(const AZStd::string& name)
{
static AZStd::string k_emptyString;
AZStd::unordered_map< AZStd::string, AZStd::string >::iterator attributeIter = m_attributes.find(name);
if (attributeIter != m_attributes.end())
{
return attributeIter->second;
}
return k_emptyString;
}
void TelemetryEvent::SetMetric(const AZStd::string& name, double metric)
{
m_metrics[name] = metric;
}
double TelemetryEvent::GetMetric(const AZStd::string& name)
{
AZStd::unordered_map< AZStd::string, double >::iterator metricIter = m_metrics.find(name);
if (metricIter != m_metrics.end())
{
return metricIter->second;
}
return 0.0;
}
void TelemetryEvent::Log()
{
EBUS_EVENT(TelemetryEventsBus, LogEvent, (*this));
}
void TelemetryEvent::ResetEvent()
{
m_metrics.clear();
m_attributes.clear();
}
const char* TelemetryEvent::GetEventName() const
{
return m_eventName.c_str();
}
const TelemetryEvent::AttributesMap& TelemetryEvent::GetAttributes() const
{
return m_attributes;
}
const TelemetryEvent::MetricsMap& TelemetryEvent::GetMetrics() const
{
return m_metrics;
}
}
@@ -1,45 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef TELEMETRY_TELEMETRYEVENT_H
#define TELEMETRY_TELEMETRYEVENT_H
#include <AzCore/std/containers/unordered_map.h>
#include <AzCore/std/string/string.h>
namespace Telemetry
{
class TelemetryEvent
{
public:
typedef AZStd::unordered_map< AZStd::string, AZStd::string > AttributesMap;
typedef AZStd::unordered_map< AZStd::string, double > MetricsMap;
TelemetryEvent(const char* eventName);
void SetAttribute(const AZStd::string& name, const AZStd::string& value);
const AZStd::string& GetAttribute(const AZStd::string& name);
void SetMetric(const AZStd::string& name, double metric);
double GetMetric(const AZStd::string& name);
void Log();
void ResetEvent();
const char* GetEventName() const;
const AttributesMap& GetAttributes() const;
const MetricsMap& GetMetrics() const;
private:
AZStd::string m_eventName;
AttributesMap m_attributes;
MetricsMap m_metrics;
};
}
#endif
-9
View File
@@ -9,17 +9,11 @@
set(FILES
Source/StandaloneToolsApplication.cpp
Source/StandaloneToolsApplication.h
Source/Telemetry/TelemetryBus.h
Source/Telemetry/TelemetryComponent.cpp
Source/Telemetry/TelemetryComponent.h
Source/Telemetry/TelemetryEvent.cpp
Source/Telemetry/TelemetryEvent.h
Source/LuaIDEApplication.h
Source/LuaIDEApplication.cpp
Source/AssetDatabaseLocationListener.h
Source/AssetDatabaseLocationListener.cpp
Source/Editor/LuaEditor.cpp
Source/LUA/BasicScriptChecker.h
Source/LUA/BreakpointPanel.cpp
Source/LUA/BreakpointPanel.hxx
Source/LUA/ClassReferenceFilter.cpp
@@ -33,7 +27,6 @@ set(FILES
Source/LUA/LUAContextControlMessages.h
Source/LUA/LUADebuggerComponent.cpp
Source/LUA/LUADebuggerComponent.h
Source/LUA/LUADebuggerMessages.h
Source/LUA/LUAEditorBlockState.h
Source/LUA/LUAEditorBreakpointWidget.cpp
Source/LUA/LUAEditorBreakpointWidget.hxx
@@ -71,10 +64,8 @@ set(FILES
Source/LUA/LUAEditorViewMessages.h
Source/LUA/LUALocalsTrackerMessages.h
Source/LUA/LUAStackTrackerMessages.h
Source/LUA/LUATargetContextTrackerMessages.cpp
Source/LUA/LUATargetContextTrackerMessages.h
Source/LUA/LUAWatchesDebuggerMessages.h
Source/LUA/ScriptCheckerAPI.h
Source/LUA/StackPanel.cpp
Source/LUA/StackPanel.hxx
Source/LUA/TargetContextButton.cpp