Forums › BB Series Discussions › BB60C Sweep Test CPU Load Issue › Reply To: BB60C Sweep Test CPU Load Issue
blackmore90
Thank you very much for your fast response Andrew.
I have decided to minimize the test complexity to eliminate potential effects of other sub-projects. I have created the following very simple CPP code:
#include <iostream>
#include “bb_api.h”
int main()
{
int handle = 0;
bbStatus openStatus = bbOpenDevice(&handle);
bbConfigureAcquisition(handle, BB_AVERAGE, BB_LOG_SCALE);
bbConfigureCenterSpan(handle, 3.000005e9, 5.999991e9);
bbConfigureLevel(handle, -30, BB_AUTO_ATTEN);
bbConfigureGain(handle, BB_AUTO_GAIN);
bbConfigureSweepCoupling(handle, 5e3, 5e3, 1e-3, BB_RBW_SHAPE_FLATTOP, BB_NO_SPUR_REJECT);
bbConfigureProcUnits(handle, BB_POWER);
bbStatus initStatus = bbInitiate(handle, BB_SWEEPING, 0);
unsigned int sweepsize;
double binsize, startfreq;
bbQueryTraceInfo(handle, &sweepsize, &binsize, &startfreq);
float *min_swp = new float[sweepsize];
float *max_swp = new float[sweepsize];
for(int i = 0; i<1e6; i++){
bbStatus swpStatus = bbFetchTrace_32f(handle, sweepsize, min_swp, max_swp);
}
return 0;
}
It results in about 18% CPU usage on my ASUS laptop. The system has i7-4700hq CPU, 16GB of RAM and the BB60C is connected to USB 3.0 port. Configuration is x64. This code uses about 8 threads and I have attached the thread display if you would like to check.
Actually, I am planning to port the code to another computer which will have Intel Atom series processor. My project will likely result in a huge CPU load on that PC.
Does that test really make sense in roughly measuring the CPU load?
Thank you.
