2. What is the observer effect?
a) Observing influences outcome
b) Observing never influences outcome
c) Observing and the outcome are independent
d) Observing and the outcome are not related
Explanation: The observer effect says that simply observing an act influences its outcome. This is often the result of instruments that, by necessity, alter the state of what they measure in some manner.
3. Which of the following are ways to benchmark code?
a) Timing the code
b) Calculating the number of operations performed
c) Timing the code & Calculating the number of operations performed
d) Calculating the number of lines
Explanation: There are a couple of ways to benchmark code—either by timing it or by calculating the number of operations performed during execution. Both of them help in calculating how efficient and modular the code.
4. How to calculate the run time of a code?
a) Start time – End time
b) End time – Start time
c) Start time/ End time
d) Start time * End time
Explanation: Run-time statements use the static resources created by compile-time statements, but can also create, use, and destroy dynamic resources at run time. The run time of code can be calculated as:
run time = end time – start time
5. According to the workflow of a runtime logging, what happens after calculating the run time?
a) Display to screen
b) Log to server
c) Either Display to screen or Log to server
d) Server to log
Explanation: According to the workflow of a runtime logging, after calculating the run time, decision boxes are kept that will check to either display to the debug screen or log to the server.
6. Which of the following object is used to post the data to an external process, say savePerfData?
Explanation: XHR(XMLHttpRequest) is an API in the form of an object whose methods transfer data between a web browser and a web server. The benchmarking process will call the external process. We use XHR object to post the data to the external process.
7. Where does the external process save the result of the test?
a) Normal file
b) Flat file
d) .exe file
Explanation: A flat file consists of a single table of data. It allows the user to specify data attributes, such as columns and data types table by table, and stores those attributes separate from applications. The external process, say savePerfData should in turn save the results of the test in a flat file.
8. Which function is used to start the time logging?
Explanation: The function startTimeLogging() is used to start the time logging. The startTimeLogging() method captures the timing data for ad hoc, etc for referencing an uncached document.location.
a) SanfoundryThe Best
b) Sanfoundry The Best
c) Object required error