Skip to content

refactor: Clarify naming of profiler constants (fix #602 and fix #603) - #611

Merged
mattwalsh-unity merged 3 commits into
release/0.1.0from
fix/profiler_constant_naming
Mar 15, 2021
Merged

refactor: Clarify naming of profiler constants (fix #602 and fix #603)#611
mattwalsh-unity merged 3 commits into
release/0.1.0from
fix/profiler_constant_naming

Conversation

@Rosme

@Rosme Rosme commented Mar 12, 2021

Copy link
Copy Markdown

No description provided.

Comment on lines +47 to +53
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RPCsSent, m_Category = ProfilerCategory.Network.Name },
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RPCsReceived, m_Category = ProfilerCategory.Network.Name },
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RPCBatchesSent, m_Category = ProfilerCategory.Network.Name },
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RPCBatchesReceived, m_Category = ProfilerCategory.Network.Name },
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RPCQueueProcessed, m_Category = ProfilerCategory.Network.Name },
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RPCsInQueueSize, m_Category = ProfilerCategory.Network.Name },
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RPCsOutQueueSize, m_Category = ProfilerCategory.Network.Name },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RPC should be capitalized as Rpc not RPC according to naming standards.
But RpcsSent doesn't look great to me either — so, should we drop plurals since they are re numbers/counts?
I'm thinking RpcSent or NumRpcSent etc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also isn't this a refactor rather than a fix?
I think PR/commit title should be refactor: clarify naming... instead of fix: clarify naming...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See, I didn't know about the refactor thing lol. Makes sense. Will correct title. Will also remove the S. But since it was for the profiler, it's understood it's a number, hence why we don't want Num or Number. I'll update the PR.

@Rosme Rosme changed the title fix: Clarify naming of profiler constants (fix #602 and fix #603) refactor: Clarify naming of profiler constants (fix #602 and fix #603) Mar 15, 2021
private static List<MLAPIProfilerCounter> CreateOperationsCounters() => new List<MLAPIProfilerCounter>()
{
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfConnections, m_Category = ProfilerCategory.Network.Name },
new MLAPIProfilerCounter { m_Name = ProfilerConstants.Connection, m_Category = ProfilerCategory.Network.Name },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one should still be plural, although Kamau already made that change in #613 so may be worth pulling this one out to avoid conflicts

@0xFA11 0xFA11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently — you have some conflicts to resolve but apart from that 🚀

@Rosme

Rosme commented Mar 15, 2021

Copy link
Copy Markdown
Author

Conflict should be fixed and works now

@mattwalsh-unity
mattwalsh-unity merged commit 05206d6 into release/0.1.0 Mar 15, 2021
@mattwalsh-unity
mattwalsh-unity deleted the fix/profiler_constant_naming branch March 15, 2021 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profiler: "NumberOfX" counter names are unnecessarily long Profiler: NumberNamedMessages is not a clear name to describe its function

4 participants