mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 19:15:05 +00:00
Remove use of const from packager and add systrace internally
Reviewed By: @martinbigio Differential Revision: D2471270
This commit is contained in:
parent
da284f6e36
commit
1ab650f958
@ -220,9 +220,9 @@ function systraceProfileMiddleware(req, res, next) {
|
||||
}
|
||||
|
||||
console.log('Dumping profile information...');
|
||||
const dumpName = '/tmp/dump_' + Date.now() + '.json';
|
||||
const prefix = process.env.TRACE_VIEWER_PATH || '';
|
||||
const cmd = path.join(prefix, 'trace2html') + ' ' + dumpName;
|
||||
var dumpName = '/tmp/dump_' + Date.now() + '.json';
|
||||
var prefix = process.env.TRACE_VIEWER_PATH || '';
|
||||
var cmd = path.join(prefix, 'trace2html') + ' ' + dumpName;
|
||||
fs.writeFileSync(dumpName, req.rawBody);
|
||||
childProcess.exec(cmd, function(error) {
|
||||
if (error) {
|
||||
@ -258,10 +258,10 @@ function cpuProfileMiddleware(req, res, next) {
|
||||
}
|
||||
|
||||
console.log('Dumping CPU profile information...');
|
||||
const dumpName = '/tmp/cpu-profile_' + Date.now();
|
||||
var dumpName = '/tmp/cpu-profile_' + Date.now();
|
||||
fs.writeFileSync(dumpName + '.json', req.rawBody);
|
||||
|
||||
const cmd = path.join(__dirname, '..', 'JSCLegacyProfiler', 'json2trace') + ' -cpuprofiler ' + dumpName + '.cpuprofile ' + dumpName + '.json';
|
||||
var cmd = path.join(__dirname, '..', 'JSCLegacyProfiler', 'json2trace') + ' -cpuprofiler ' + dumpName + '.cpuprofile ' + dumpName + '.json';
|
||||
childProcess.exec(cmd, function(error) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user