aerin
10/07/2020, 9:35 PMCraig
10/07/2020, 10:19 PMCraig
10/07/2020, 10:19 PMaerin
10/07/2020, 10:22 PMericbirdsall
10/07/2020, 10:23 PMericbirdsall
10/07/2020, 10:23 PMaerin
10/07/2020, 10:27 PMMike Robbins
10/07/2020, 11:35 PMbattk
10/08/2020, 12:14 AMbattk
10/08/2020, 12:15 AM{
"type": "mapreduce.Summary",
"dateCreated": "2020-10-07T22:46:15.778Z",
"seconds": 1239,
"usage": 60005,
"concurrency": 2,
"yields": 5
}
battk
10/08/2020, 12:15 AM{
"type": "mapreduce.Summary",
"dateCreated": "2020-10-07T23:01:21.439Z",
"seconds": 3263,
"usage": 60005,
"concurrency": 2,
"yields": 5
}
battk
10/08/2020, 12:15 AM{
"type": "mapreduce.Summary",
"dateCreated": "2020-10-07T23:32:11.777Z",
"seconds": 3909,
"usage": 60005,
"concurrency": 2,
"yields": 5
}
battk
10/08/2020, 12:16 AM/**
* @NApiVersion 2.1
* @NScriptType UserEventScript
* @NModuleScope SameAccount
*/
define([], function () {
return {
beforeSubmit: function (context) {
log.debug("beforeSubmit", context);
},
};
});
so its more of a test of the 2.1 overhead vs the 2.0 overheadbattk
10/08/2020, 12:17 AMCraig
10/08/2020, 12:40 AMCraig
10/08/2020, 12:40 AMCraig
10/08/2020, 12:41 AMbattk
10/08/2020, 12:42 AMaerin
10/08/2020, 12:44 AMbattk
10/08/2020, 12:44 AMbattk
10/08/2020, 12:46 AMbattk
10/08/2020, 12:47 AMbattk
10/08/2020, 12:48 AMaerin
10/08/2020, 12:48 AMaerin
10/08/2020, 12:49 AMbattk
10/08/2020, 12:49 AMbattk
10/08/2020, 12:50 AMaerin
10/08/2020, 12:50 AMbattk
10/08/2020, 12:50 AMaerin
10/08/2020, 12:50 AMbattk
10/08/2020, 12:52 AMbattk
10/08/2020, 12:52 AMbattk
10/08/2020, 12:53 AMaerin
10/08/2020, 12:55 AMaerin
10/08/2020, 12:55 AMbattk
10/08/2020, 12:55 AMaerin
10/08/2020, 12:55 AMaerin
10/08/2020, 12:56 AMbattk
10/08/2020, 12:57 AMbattk
10/08/2020, 12:57 AMbattk
10/08/2020, 12:58 AMaerin
10/08/2020, 12:58 AMbattk
10/08/2020, 1:02 AM/**
* @NApiVersion 2.0
* @NScriptType MapReduceScript
*/
define(["N/record"], function (record) {
function getInputData() {
return new Array(10000)
}
function map(context) {
record.load({id: '4956', type: 'salesorder'});
}
function reduce(context) {
log.debug("reduce context", context);
}
function summarize(summary) {
log.debug("summary", summary);
if (summary.inputSummary.error) {
log.error({
title: "Input Error",
details: summary.inputSummary.error,
});
}
summary.mapSummary.errors
.iterator()
.each(function (key, error, executionNumber) {
log.error({
title:
"Map error on key: " +
key +
", executionNumber: " +
executionNumber,
details: error,
});
return true;
});
summary.reduceSummary.errors
.iterator()
.each(function (key, error, executionNumber) {
log.error({
title:
"Reduce error on key: " +
key +
", executionNumber: " +
executionNumber,
details: error,
});
return true;
});
}
return {
getInputData: getInputData,
map: map,
reduce: reduce,
summarize: summarize,
};
});
aerin
10/08/2020, 1:03 AMbattk
10/08/2020, 1:04 AMbattk
10/08/2020, 1:04 AMmichoel
10/08/2020, 1:32 AMkeep in mind that 2.0 and 2.1 are backed by the same java backend@battk 2.0 is backed by Rhino and 2.1 by GraalVM
battk
10/08/2020, 1:33 AMbattk
10/08/2020, 1:33 AMmichoel
10/08/2020, 1:35 AMmichoel
10/08/2020, 1:36 AMmichoel
10/08/2020, 1:36 AMbattk
10/08/2020, 1:38 AMbattk
10/08/2020, 1:39 AMmichoel
10/08/2020, 1:42 AMmichoel
10/08/2020, 1:42 AMmichoel
10/08/2020, 1:42 AMperform or disclose any benchmarking, availability or performance testing of the Service
michoel
10/08/2020, 1:45 AMbattk
10/08/2020, 1:50 AMbattk
10/08/2020, 1:51 AMbattk
10/08/2020, 1:51 AMBrendan Boyd
10/08/2020, 2:26 AMBrendan Boyd
10/08/2020, 4:17 AMbattk
10/08/2020, 6:26 AMbattk
10/08/2020, 6:26 AM{
"type": "mapreduce.Summary",
"dateCreated": "2020-10-08T01:02:17.346Z",
"seconds": 4427,
"usage": 100000,
"concurrency": 2,
"yields": 9
}
battk
10/08/2020, 6:26 AM{
"type": "mapreduce.Summary",
"dateCreated": "2020-10-08T02:19:22.791Z",
"seconds": 17321,
"usage": 100000,
"concurrency": 2,
"yields": 9
}
battk
10/08/2020, 6:30 AMfunction getInputData() {
var arr = [];
for (var i = 0; i < 10000; i++) {
arr.push('{}')
}
return arr;
}
since 2.1 took offense to returning an array with empty elementsbattk
10/08/2020, 6:31 AMCraig
10/08/2020, 7:38 AMbattk
10/08/2020, 7:42 AMbattk
10/08/2020, 12:25 PM{
"type": "mapreduce.Summary",
"dateCreated": "2020-10-08T06:33:02.635Z",
"seconds": 5599,
"usage": 100000,
"concurrency": 1,
"yields": 10
}
for 2.1 the summary object was
{
"type": "mapreduce.Summary",
"dateCreated": "2020-10-08T06:33:02.192Z",
"seconds": 19197,
"usage": 100000,
"concurrency": 1,
"yields": 10
}
battk
10/08/2020, 12:30 PMdefine(["N/record"], function (record) {
function getInputData() {
var arr = [];
for (var i = 0; i < 10000; i++) {
arr.push('{}')
}
return arr;
}
function map(context) {
record.load({id: '4956', type: 'salesorder'});
}
function summarize(summary) {
log.debug("summary", summary);
if (summary.inputSummary.error) {
log.error({
title: "Input Error",
details: summary.inputSummary.error,
});
}
summary.mapSummary.errors
.iterator()
.each(function (key, error, executionNumber) {
log.error({
title:
"Map error on key: " +
key +
", executionNumber: " +
executionNumber,
details: error,
});
return true;
});
summary.reduceSummary.errors
.iterator()
.each(function (key, error, executionNumber) {
log.error({
title:
"Reduce error on key: " +
key +
", executionNumber: " +
executionNumber,
details: error,
});
return true;
});
}
return {
getInputData: getInputData,
map: map,
summarize: summarize,
};
});
michoel
10/08/2020, 10:05 PMmichoel
10/22/2020, 4:34 AMaerin
10/22/2020, 2:10 PMbattk
10/22/2020, 2:13 PMbattk
10/22/2020, 2:14 PMbattk
10/22/2020, 2:14 PMmichoel
10/22/2020, 7:34 PM