-
Notifications
You must be signed in to change notification settings - Fork 23
RangeError: Invalid string lenght #24
Comments
@icebob can explain this much better than me but I can give some hints about how metrics are measured.
Doing some quick look at moleculer-metrics/packages/moleculer-console-tracer/src/index.js Lines 244 to 247 in cd54832
The moleculer-metrics/packages/moleculer-console-tracer/src/index.js Lines 45 to 66 in cd54832
This means that you can extend Regarding the actual content of metrics, you can see it here
The metrics are registered as a middleware, i.e., they wrap action calls. So the metrics middleware is called right before executing an action and after the response is received back. The metrics start function looks like this: Stop looks like this: And finally here is how they are called: Regarding the error. Can you please create a reproduction repo ? |
I will study the code a little more calmly to understand everything you have informed me. Because basically I need this time data always being recorded in a spreadsheet and then plotting it on a chart having the mean and standard deviation. Regarding the error follows my repository: |
I believe that the error I was giving was due to the console-tracer module trying to print a very large value, so RangeError, something very long: [...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................[|||||||||].................................................................................] This still needs to be resolved, perhaps more calmly. I was able to run Tracer on two devices now, just using the request object that stores all the data. Practically I disabled all printing in the console, and left only the functionality of the request object and used this.logger.info to print the request in the console. In the future I will make these records in a database. You can close the topic. Thank you very much for the explanation and help. |
Hello, I am a graduate student in electrical engineering from the State University of São Paulo, Brazil - SP and we are using the molecular framework as the basis for our project.
We would like to do the orchestration and choreography of microservices applied in an industrial plant to control a level mesh comparing the total execution time as well as the time of each route.
To do this we saw that you have the molecular-console-tracer module, we created a basic orchestration service to call each node's hello services sequentially:
We did 2 tests before we ran our application to understand it better. The provision of services was distributed as follows in the tests:
Test 1:
Result 1
Test 2:
Result 2
As you can see in our test 2 when calling node-21's greeter.hello service that is on raspberry we got an error (RangeError: Invalid string lenght) show in the figure above in results.
Could you help me remedy this mistake?
Taking advantage of the post I would like to better understand how these times are measured, ie when the time starts and when it ends, and know where these values are stored if you want to build a mean and standard deviation graph. I say this because I got a little confused in test 1, because we have two api.rest in the result should not be just one, api.rest gives two different times api.rest 28ms and api.rest 3ms.
The text was updated successfully, but these errors were encountered: