Command line, Response times and processing times - command-line

i am new to command line and wondering why there is a difference between response time and processing time when executing a command
I am aware one reason is because the response time is the sum of the processing time and encountered latencies. But what are other reasons?

Related

http REST consumer timeout

I implemented a https/REST provider in node.js using express. The function is calling a webservice, transforming/enhancing data and returning transformed data as csv using response. Execution time of one get request is between 4 minutes 30 seconds and 5 minutes. I want to test the implementation by calling the url.
Problem:
execution in google chrome fails since it runs to long. No option to
increase the time out value.
execution in modzilla firefox:
network.http.response.timeout changed. Now the request is executed
over and over again. Looks like the response is ignored completely.
execution in postman: changed settings->general->XHR timeout in ms(...) .
Nevertheless execution stops every time after the same amount of seconds with
message: "Could not get any response" .
My question: which tool(s) can I use for reliable testing of long running http REST requests?
curl has a --max-time in seconds setting which should do what you want.
curl -m 330 http://you.url
But it might be worth creating a background job and polling for completion of the background job instead. HTTP isn't best suited to long running tasks.
I suggest you to use Socket IO to async response with pub/sub when the csv file is ready In the client send the request and put a timeout of 6 minutes for example, the server in the request return an ack to confirm the file process start, when the file is ready, return with Socket IO the file, Socket IO can be integrated with express
http://socket.io/
Do you have control over the server? If so, you should alter how it operates. Instead of the initial request expecting a response containing the answer, your API should emit a token (a URI) from where the status of the operation can be obtained. The status will either be "in progress" or "completed; here's your answer: ..."
You make the problem (the long-running operation) into its own first-class entity on your server.

celery signals not being received from the celery batch processing

I am using celery.contrib.batches to execute a batch of celery tasks. I know its experimental but still wanted to give it a try and I am pretty close. While executing individual tasks in the batch and I am sending signals like backend.mark_as_started(request.id), backend.mark_as_done(request.id, True) deliberately. But the signals are not being received at the worker. Note that everything works if I get rid of batches and execute task one a time. Meaning, my signal handler functions do get executed.
The celery.contrib.Batches indeed do not send these signals. The solution is to send those signals from inside the Batch task.

What is the difference between Completion time and response time when dealing with scheduling policies

I've been looking online for a while now, trying to find definitions and examples on these two terms but I cannot seem to get a straight answer and I am simply getting more confused.
Could someone explain the difference to me. A nice and descriptive article would help.
I haven't found any link containing the description of "Completion time", nor I read that in my OS course. I think you are inquiring about the Turnaround time.
Turnaround time - Time required for a particular process to complete, from submission time to completion. It is equal to the sum total of Waiting time and Execution time.
Response time - The time taken in a program from the issuance of a command to the commence of a response to that command.(i.e., the time-interval between submission of a request, and the first response to that request, not the output .)
Completion Time
Completion time Can be found from Gantt Chart When a process stop executing That is completion time.
Response Time
Response time is the difference between first execution time and Arrival time.
In case of scheduling policies:
COMPLETION TIME
The time when a job or process is completed.
RESPONSE TIME
Time interval between the submission of a job, process or sub-
request (the moment it enters a ready state/arrives to the scheduler) and the first response received from it.
Completion time : this is the time when process arrives the cpu means arrival time and + cpu execution time +any other interrupt time till the complete execution of the process. Arrival time is not added if process arrives before the execution of earlier process.
Response time : it is the time when process gets cpu response for first time after arriving the queue. Same as waiting time.
The time taken by the system to respond to an input and display of required updated information is termed as the response time.
The time taken from submission of the job to the time completion of the job is TurnAround Time. Sum of Burst time and the waiting Time
Response Time: Time between job’s arrival in the ready queue and job’s
completion
for example
- Time to echo a keystroke in editor
- Time to compile a program
Response Time = Waiting Time + COMPLETION TIME Time
COMPLETION TIME: The time when a job or process is completed.

I want to find out how much time does each step of SOAP Processing takes i.e,Parsing time,invoking time etc?

I know how to find out complete processing time of the SOAP Message but i want to find out the time taken to perform individual steps of SOAP Processing so that i can improve the efficiency
You could always create DateTime and grab the time at the time of execution, it wont be perfect but you can then just subtract the times and get the final millisecond or seconds value from each execution.

Why would a Service Broker Receive take longer than the specified timeout?

I'm writing a high load application that uses SQL Server Service Broker. I have got to a state where running the following script in Management Studio takes 1 minute 6 seconds, even after I have stopped the application. What could be causing it to take so long? I thought the TIMEOUT would make it stop after half a second?
WAITFOR (RECEIVE TOP(1) * FROM [targetqueuename]), TIMEOUT 500;
SELECT ##ERROR;
##ERROR is returning 0. After the first run taking this long, subsiquent runs are returning instantly.
WAITFOR(RECEIVE), TIMEOUT works by actually running the RECEIVE at least once. If the result set is empty, it continues to wait. Every time it believes that it can succeed (it gets notified internally that more messages are available) it runs the RECEIVE again. Repeat in a loop until either it returns rows or it times out.
But the timeout does not interrupt a RECEIVE already executing inside this loop. If the RECEIVE is taking long to find messages in the queue (can happen with large queues or with bad execution plans for RECEIVE) then the timeout cannot be honored. Note that this can be the case even if the RECEIVE does not find any message, since the queue may contain a large number of messages all locked (more precisely all belonging to locked conversation groups). In this case the RECEIVE may take a long time to execute, searching for unlocked conversation groups and in the end still come empty handed.