aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov/src/profiler_subprovider.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-cov/src/profiler_subprovider.ts')
-rw-r--r--packages/sol-cov/src/profiler_subprovider.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/sol-cov/src/profiler_subprovider.ts b/packages/sol-cov/src/profiler_subprovider.ts
index ac878c070..9fd815f07 100644
--- a/packages/sol-cov/src/profiler_subprovider.ts
+++ b/packages/sol-cov/src/profiler_subprovider.ts
@@ -1,8 +1,7 @@
-import * as _ from 'lodash';
-
import { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_adapter';
import { ProfilerManager } from './profiler_manager';
import { TraceCollectionSubprovider } from './trace_collection_subprovider';
+import { TraceInfo } from './types';
/**
* This class implements the [web3-provider-engine](https://github.com/MetaMask/provider-engine) subprovider interface.
@@ -25,12 +24,13 @@ export class ProfilerSubprovider extends TraceCollectionSubprovider {
super(defaultFromAddress, traceCollectionSubproviderConfig);
this._profilerManager = new ProfilerManager(artifactAdapter, isVerbose);
}
+ public async handleTraceInfoAsync(traceInfo: TraceInfo): Promise<void> {
+ await this._profilerManager.computeSingleTraceCoverageAsync(traceInfo);
+ }
/**
* Write the test profiler results to a file in Istanbul format.
*/
public async writeProfilerOutputAsync(): Promise<void> {
- const traceInfos = this.getCollectedTraceInfos();
- _.forEach(traceInfos, traceInfo => this._profilerManager.appendTraceInfo(traceInfo));
await this._profilerManager.writeProfilerOutputAsync();
}
}