Hi I have a requirement to get VU per on different profile per given time.
My scenario is this.I want to show VU count on Gauge metricx, how many VUs for a particulate profile in given time. But problem in given code, value didn’t share between VUs.
Is that make sense ?
var profiles = recordings.map(function(r) {
return { profile : r.key, count : 0};
});
export default function() {
var profile = profiles.find(x=>x.profile == recording.key);
let recording = recordings[Math.floor(Math.random()*recordings.length)];
profile.count+=1;
profile_vu_gauge.add(profile.count,{ profile: recording.key})
console.log('FILE :'+recording.key);
console.log(`VU: ${__VU} - ITER: ${__ITER}`);
group('profile-'+recording.key, function() {
let st = Date.now();
recording.method();
myTrend.add(Date.now() - st, { profile: recording.key});
//recordingTrends[i].add(Date.now() - st, { profile: x.key});
profile_trend.add(Date.now() - st, { profile: recording.key});
});
profile.count -=1;
profile_vu_gauge.add(profile.count,{ profile: recording.key});
group('idle-time', function() {
sleep(Math.floor(Math.random() * 30 + 10));
});
}