spincycle | Automate and expose complex infrastructure tasks | Infrastructure Automation library
kandi X-RAY | spincycle Summary
kandi X-RAY | spincycle Summary
Automate and expose complex infrastructure tasks to teams and services.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- buildSeqGraph builds a graph from a sequence spec .
- Run the application
- Main entry point .
- NewAPI returns a new API instance .
- Validate validates the given job chain .
- isAcyclic returns true if the given jobChain is in the queue .
- ParseSpecsDir parses the given specs directory .
- ParseConfigFiles parses a comma - separated list of config files .
- NewTraverser returns a new traverser .
- IsDoneRunning returns whether the current chain is done or not .
spincycle Key Features
spincycle Examples and Code Snippets
Community Discussions
Trending Discussions on spincycle
QUESTION
I am learning Haskell, and as a task for myself I was trying to implement a Universal Machine from ICFP Contest 2006. I came up with a code, which, at a first glance, seems to be working. However, when I try to execute any application for that Universal Machine provided on the contest's website (e.g. sandmark.umz), my implementation is too slow to actually run anything. Self-check did not finish in a couple of hours, and I had to kill the process. So, I am clearly doing something wrong, I just don't know what.
I have tried to use Haskell's profiler, but I couldn't make any sense out of those numbers as well. Garbage collection doesn't seem to be taking a lot of time (3 seconds out of 173 seconds of a sample). However, total allocated memory during those 173 seconds was almost 6 GB, while the maximum heap size was 13 MB.
Could you help me understand, what is wrong with my code? I know that the amount of code is quite large, but I am not sure how to come up with a minimum reproducible example in my case, when I don't really know what is relevant, and what is not. Thank you.
...ANSWER
Answered 2020-Jul-23 at 21:04Total allocation of 3 gigabytes for a Haskell programming running for 176 seconds is miniscule. Most Haskell programs allocate 3-6 gigabytes per second for their entire runtime. In your case, much of the program is running in tight, allocation-free loops (generally a good thing when you're trying to write a fast program), which may explain the small amount of allocation. The small proportion of time spent garbage collecting is also a good sign.
I tested your program on sandmark.umz
andcodex.umz
, built with -O2
and no profiling.
I believe the main problem is that the hPutStrLn
logging lines are generating tons of output, so your universal machine is spending all its time writing logs.
Comment out all the hPutStrLn
lines, and SANDmark prints a line every few seconds. I have no idea how fast it's supposed to be, but it's certainly running.
For Codex, it completes the self-check succeeded
in a few seconds and accepts a 32-character key. If you enter the wrong key, it prints "wrong key". If you enter the right key, it prints "decrypting..." At this point, it seems to freeze up, so I suspect your implementation is too slow, but not nearly as slow as you were reporting.
Note that you may find it helpful to turn off buffering on stdin
and stdout
at the start of main
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spincycle
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page