Skip to content

Commit

Permalink
feat: Limit usage lines moveee into default namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
lukecotter committed Jan 10, 2024
1 parent 9e2765a commit f5d77f6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions log-viewer/modules/parsers/ApexLogParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,6 @@ export class MethodEntryLine extends Method {
if (this.text.indexOf('System.Type.forName(') !== -1) {
// assume we are not charged for class loading (or at least not lengthy remote-loading / compiling)
this.cpuType = 'loading';
// this.namespace = 'default';
} else {
const methodNameParts = parts[4]?.split('.') ?? '';
const possibleNs = methodNameParts[0] ?? '';
Expand Down Expand Up @@ -1218,8 +1217,6 @@ class VFFormulaEndLine extends LogLine {
}

class VFSeralizeViewStateStartLine extends Method {
namespace = 'system';

constructor(parts: string[]) {
super(parts, ['VF_SERIALIZE_VIEWSTATE_END'], 'System Method', 'method');
}
Expand Down Expand Up @@ -1426,26 +1423,30 @@ class UserDebugLine extends LogLine {
}

class CumulativeLimitUsageLine extends Method {
namespace = 'default';
constructor(parts: string[]) {
super(parts, ['CUMULATIVE_LIMIT_USAGE_END'], 'System Method', 'system');
}
}

class CumulativeProfilingLine extends LogLine {
acceptsText = true;
namespace = 'default';
constructor(parts: string[]) {
super(parts);
this.text = parts[2] + ' ' + (parts[3] ?? '');
}
}

class CumulativeProfilingBeginLine extends Method {
namespace = 'default';
constructor(parts: string[]) {
super(parts, ['CUMULATIVE_PROFILING_END'], 'System Method', 'custom');
}
}

class LimitUsageLine extends LogLine {
namespace = 'default';
constructor(parts: string[]) {
super(parts);
this.lineNumber = this.parseLineNumber(parts[2]);
Expand All @@ -1455,6 +1456,7 @@ class LimitUsageLine extends LogLine {

class LimitUsageForNSLine extends LogLine {
acceptsText = true;
namespace = 'default';

constructor(parts: string[]) {
super(parts);
Expand Down Expand Up @@ -1525,8 +1527,6 @@ class NBAStrategyError extends LogLine {
}

class PushTraceFlagsLine extends LogLine {
namespace = 'system';

constructor(parts: string[]) {
super(parts);
this.lineNumber = this.parseLineNumber(parts[2]);
Expand All @@ -1535,8 +1535,6 @@ class PushTraceFlagsLine extends LogLine {
}

class PopTraceFlagsLine extends LogLine {
namespace = 'system';

constructor(parts: string[]) {
super(parts);
this.lineNumber = this.parseLineNumber(parts[2]);
Expand Down

0 comments on commit f5d77f6

Please sign in to comment.