Page MenuHomeWildfire Games

Make profiler2 configurable
Needs ReviewPublic

Authored by Stan on Nov 26 2019, 5:10 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Like me some other devs have stuff running on the 8000 port, and the game will start a debug break if port is already used. Instead it would be nice if one could change that without needing to recompile the game. This patch does that.

Also notice the profiler2 is broken if you don't have D2373 applied and you are running the userreporter.
Also notify the user that a json file is written to disk.

Test Plan

Play around with the options to try different configuration.
Make you sure you can now host on other ports

Diff Detail

Event Timeline

Stan created this revision.Nov 26 2019, 5:10 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/651/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1167/display/redirect

Stan retitled this revision from Make profiler configurable to Make profiler2 configurable.Nov 26 2019, 5:28 PM
Stan edited the summary of this revision. (Show Details)
vladislavbelov added inline comments.
binaries/data/config/default.cfg
137

I think number fields can be just numbers, not strings.

source/ps/Profiler2.cpp
194

Is it safe to pass local variables?

945

The value was different, wasn't it?

Stan marked 3 inline comments as done.Nov 26 2019, 5:32 PM
Stan added inline comments.
binaries/data/config/default.cfg
137

I wanted them to be but how to the concat ?

source/ps/Profiler2.cpp
194

Mongoose is not *safe* There are quite a few warnings in that lib...

945

It was but it makes no point does it?

binaries/data/config/default.cfg
137

Just get value as string?

source/ps/Profiler2.cpp
194

I mean will it access string pointers after mg_start call? After current scoped?

945

I think it doesn't work, because ConstructJSONResponse does a search for GetName(), not for CStr(storage->GetName()).EscapeToPrintableASCII(). That means it won't find a thread in case of unprintable characters.

Stan updated this revision to Diff 10428.Nov 27 2019, 12:19 PM
Stan marked 5 inline comments as done.

Use ints remove the changes.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/653/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/ps/Profiler2.h
|  96| class·CProfiler2
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCProfiler2{' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1169/display/redirect