Skip to content

Commit

Permalink
[PerfMetrics] rename to starturl
Browse files Browse the repository at this point in the history
  • Loading branch information
MFransen69 committed Apr 10, 2022
1 parent 82f286f commit 59d21df
Show file tree
Hide file tree
Showing 4 changed files with 2,366 additions and 7 deletions.
2 changes: 1 addition & 1 deletion PerformanceMetrics/PerformanceMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace Plugin {
ASSERT(_observable.IsValid() == false);
}

constexpr char PerformanceMetrics::IBrowserMetricsLogger::aboutBlankURL[];
constexpr char PerformanceMetrics::IBrowserMetricsLogger::startURL[];

}
}
8 changes: 4 additions & 4 deletions PerformanceMetrics/PerformanceMetrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ namespace Plugin {

struct IBrowserMetricsLogger : public IStateMetricsLogger {
public:
static constexpr char aboutBlankURL[] = _T("about:blank");
static constexpr char startURL[] = _T("about:blank");

virtual void LoadFinished(const string& URL, const int32_t httpstatus, const bool success, const uint32_t totalsuccess, const uint32_t totalfailed) = 0;
virtual void URLChange(const string& URL, const bool loaded) = 0;
Expand Down Expand Up @@ -368,7 +368,7 @@ namespace Plugin {

void LoadFinished(const string& URL) override
{
if( URL != IBrowserMetricsLogger::aboutBlankURL ) {
if( URL != IBrowserMetricsLogger::startURL ) {
++_nbrloaded;
}
Logger().LoadFinished(URL, 0, true, _nbrloaded, 0);
Expand Down Expand Up @@ -449,14 +449,14 @@ namespace Plugin {

void LoadFinished(const string& URL, const int32_t httpstatus) override
{
if( URL != IBrowserMetricsLogger::aboutBlankURL ) {
if( URL != IBrowserMetricsLogger::startURL ) {
++_nbrloadedsuccess;
}
Logger().LoadFinished(URL, httpstatus, true, _nbrloadedsuccess, _nbrloadedfailed);
}
void LoadFailed(const string& URL) override
{
if( URL != IBrowserMetricsLogger::aboutBlankURL ) {
if( URL != IBrowserMetricsLogger::startURL ) {
++_nbrloadedfailed;
}
Logger().LoadFinished(URL, 0, false, _nbrloadedsuccess, _nbrloadedfailed);
Expand Down
4 changes: 2 additions & 2 deletions PerformanceMetrics/SyslogOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class SysLogOuput : public PerformanceMetrics::IBrowserMetricsLogger {

void LoadFinished(const string& URL, const int32_t, const bool success, const uint32_t totalsuccess, const uint32_t totalfailed) override
{
if( ( URL != aboutBlankURL ) && ( _timeIdleFirstStart > 0 ) ) {
if( ( URL != startURL ) && ( _timeIdleFirstStart > 0 ) ) {
_adminLock.Lock();
URLLoadedMetrics metrics(_urloadmetrics);
_adminLock.Unlock();
Expand All @@ -325,7 +325,7 @@ class SysLogOuput : public PerformanceMetrics::IBrowserMetricsLogger {

void URLChange(const string& URL, const bool) override
{
if( ( URL != aboutBlankURL ) && ( _timeIdleFirstStart > 0 ) ) {
if( ( URL != startURL ) && ( _timeIdleFirstStart > 0 ) ) {
URLLoadedMetrics metrics;
Core::SystemInfo::MemorySnapshot snapshot = Core::SystemInfo::Instance().TakeMemorySnapshot();
metrics.Total(snapshot.Total());
Expand Down
Loading

0 comments on commit 59d21df

Please sign in to comment.