Skip to content

Commit

Permalink
[GR-28018] Use insight in benchmarks.
Browse files Browse the repository at this point in the history
PullRequest: graal/7814
  • Loading branch information
Jaroslav Tulach committed Dec 8, 2020
2 parents a45aeeb + 5916c19 commit cb403bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions vm/benchmarks/agentscript/sieve-filter1.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
* questions.
*/

/* global agent */
/* global insight */

var sum = 0;
var max = 0;

agent.on('enter', (ctx, frame) => {
insight.on('enter', (ctx, frame) => {
sum += frame.number;
if (frame.number > max) {
max = frame.number;
Expand All @@ -38,7 +38,7 @@ agent.on('enter', (ctx, frame) => {
rootNameFilter: (name) => name === 'Filter'
});

agent.on('return', (ctx, frame) => {
insight.on('return', (ctx, frame) => {
log(`Hundred thousand prime numbers from 2 to ${max} has sum ${sum}`);
sum = 0;
max = 0;
Expand Down
6 changes: 3 additions & 3 deletions vm/benchmarks/agentscript/sieve-filter2.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
* questions.
*/

/* global agent */
/* global insight */

var sum = 0;
var max = 0;

agent.on('enter', (ctx, frame) => {
insight.on('enter', (ctx, frame) => {
let n = frame.number;
sum += n;
if (n > max) {
Expand All @@ -39,7 +39,7 @@ agent.on('enter', (ctx, frame) => {
rootNameFilter: (name) => name === 'Filter'
});

agent.on('return', (ctx, frame) => {
insight.on('return', (ctx, frame) => {
log(`Hundred thousand prime numbers from 2 to ${max} has sum ${sum}`);
sum = 0;
max = 0;
Expand Down

0 comments on commit cb403bb

Please sign in to comment.