diff options
Diffstat (limited to 'packages/sol-profiler')
-rw-r--r-- | packages/sol-profiler/CHANGELOG.json | 18 | ||||
-rw-r--r-- | packages/sol-profiler/CHANGELOG.md | 18 | ||||
-rw-r--r-- | packages/sol-profiler/package.json | 12 | ||||
-rw-r--r-- | packages/sol-profiler/src/index.ts | 2 | ||||
-rw-r--r-- | packages/sol-profiler/src/profiler_subprovider.ts | 6 |
5 files changed, 47 insertions, 9 deletions
diff --git a/packages/sol-profiler/CHANGELOG.json b/packages/sol-profiler/CHANGELOG.json index 223400eae..8157d441e 100644 --- a/packages/sol-profiler/CHANGELOG.json +++ b/packages/sol-profiler/CHANGELOG.json @@ -1,5 +1,23 @@ [ { + "timestamp": 1547561734, + "version": "1.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { + "timestamp": 1547225310, + "version": "1.0.1", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "version": "1.0.0", "changes": [ { diff --git a/packages/sol-profiler/CHANGELOG.md b/packages/sol-profiler/CHANGELOG.md new file mode 100644 index 000000000..ac09a1bbf --- /dev/null +++ b/packages/sol-profiler/CHANGELOG.md @@ -0,0 +1,18 @@ +<!-- +changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly. +Edit the package's CHANGELOG.json file only. +--> + +CHANGELOG + +## v1.0.2 - _January 15, 2019_ + + * Dependencies updated + +## v1.0.1 - _January 11, 2019_ + + * Dependencies updated + +## v1.0.0 - _Invalid date_ + + * Initial release as a separate package. For historical entries see @0x/sol-tracing-utils (#1492) diff --git a/packages/sol-profiler/package.json b/packages/sol-profiler/package.json index b85c82ed2..1a89e0a6b 100644 --- a/packages/sol-profiler/package.json +++ b/packages/sol-profiler/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-profiler", - "version": "1.0.0", + "version": "1.0.2", "engines": { "node": ">=6.12" }, @@ -29,14 +29,14 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-profiler/README.md", "dependencies": { - "@0x/subproviders": "^2.1.8", - "@0x/typescript-typings": "^3.0.6", - "@0x/sol-tracing-utils": "^2.1.16", - "ethereum-types": "^1.1.4", + "@0x/sol-tracing-utils": "^4.0.0", + "@0x/subproviders": "^2.1.11", + "@0x/typescript-typings": "^3.0.8", + "ethereum-types": "^1.1.6", "lodash": "^4.17.5" }, "devDependencies": { - "@0x/tslint-config": "^2.0.0", + "@0x/tslint-config": "^2.0.2", "@types/node": "*", "npm-run-all": "^4.1.2", "shx": "^0.2.2", 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 }, }; |