diff options
Diffstat (limited to 'packages/sol-profiler/src')
-rw-r--r-- | packages/sol-profiler/src/index.ts | 2 | ||||
-rw-r--r-- | packages/sol-profiler/src/profiler_subprovider.ts | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/packages/sol-profiler/src/index.ts b/packages/sol-profiler/src/index.ts index 5d4806be4..fcb715d2d 100644 --- a/packages/sol-profiler/src/index.ts +++ b/packages/sol-profiler/src/index.ts @@ -3,6 +3,8 @@ export { SolCompilerArtifactAdapter, TruffleArtifactAdapter, ContractData, + SourceCodes, + Sources, } from '@0x/sol-tracing-utils'; // HACK: ProfilerSubprovider is a hacky way to do profiling using coverage tools. Not production ready diff --git a/packages/sol-profiler/src/profiler_subprovider.ts b/packages/sol-profiler/src/profiler_subprovider.ts index c3ed13ea5..9f195f768 100644 --- a/packages/sol-profiler/src/profiler_subprovider.ts +++ b/packages/sol-profiler/src/profiler_subprovider.ts @@ -63,7 +63,7 @@ export const profilerHandler: SingleFileSubtraceHandler = ( ): Coverage => { const absoluteFileName = contractData.sources[fileIndex]; const profilerEntriesDescription = collectCoverageEntries(contractData.sourceCodes[fileIndex]); - const gasConsumedByStatement: { [statementId: string]: number } = {}; + const statementToGasConsumed: { [statementId: string]: number } = {}; const statementIds = _.keys(profilerEntriesDescription.statementMap); for (const statementId of statementIds) { const statementDescription = profilerEntriesDescription.statementMap[statementId]; @@ -83,14 +83,14 @@ export const profilerHandler: SingleFileSubtraceHandler = ( } }), ); - gasConsumedByStatement[statementId] = totalGasCost; + statementToGasConsumed[statementId] = totalGasCost; } const partialProfilerOutput = { [absoluteFileName]: { ...profilerEntriesDescription, path: absoluteFileName, f: {}, // I's meaningless in profiling context - s: gasConsumedByStatement, + s: statementToGasConsumed, b: {}, // I's meaningless in profiling context }, }; |