If the task overlaps, wait and run onlzy once.
A utility that allows retrying a function with an exponential delay between attempts.
Delay a promise a specified amount of time
Timers extensions
Delay function calls until a set time elapses after the last invocation
An efficient queue capable of managing thousands of concurrent animations.
HTTP server mocking and expectations library for Node.js
Create a deferred promise
A Tailwind CSS plugin for creating beautiful animations.
delay the evaluation of a paramless async function and cache the result
Some useful utilities I often need
One promise for multiple requests in flight to avoid async duplication
WebDriver Proxy for testing rich clients. It block certain calls until Angular is done updating the page under test.
Smart spinner helper for React, to manage the duration of loading states.
timers module for browserify
Exit your process, gracefully (if possible)
Tailwind CSS plugin, add animation-delay CSS property.
Delay a promise a minimum amount of time
a simple debounce with no dependencies or crazy defaults
Polyfill for perf_hooks.monitorEventLoopDelay(...)
This is a library for optimizing performance sensitive events and declarative preventDefault and stopPropagation
Axios plugin that intercepts failed requests and retries them whenever posible.
Evaluate asynchronous tasks with configurable concurrency.
TypeScript implementation of debounce
Delayed Job integration for the touch option of ActiveRecord belongs_to association
Sidekiq::Debounce provides a way to rate-limit creation of Sidekiq jobs. When you create a job on a Worker with debounce enabled, Sidekiq::Debounce will delay the job until the debounce period has elapsed with no additional debounce calls. If you make another job with the same arguments before the specified time has elapsed, the timer is reset and the entire period must pass again before the job is executed.
dm-sql-finders add #by_sql to your DataMapper models and provides a clean mechanism for using the names of the properties in your model, instead of the actual fields in the database. Any SQL is supported and actual DataMapper Query objects wrap the SQL, thus delaying its execution until a kicker method materializes the records for the query. \ You can also chain standard DataMapper query methods onto the #by_sql call to refine the query.
SmsSafe provides a safety net while you're developing an application that uses ActionTexter or other gems to send SMS. It keeps SMS messages from escaping into the wild. Once you've installed and configured this gem, you can rest assures that your app won't send SMS messages to external phone numbers. Instead, messages will be routed to a phone number you specify, converted into e-mails to you, or simply not sent at all. SmsSafe can also include an artificial delay to simulate the call to your SMS provider, for realistic load testing.
dm-sql-finders add #by_sql to your DataMapper models and provides a clean mechanism for using the names of the properties in your model, instead of the actual fields in the database. Any SQL is supported and actual DataMapper Query objects wrap the SQL, thus delaying its execution until a kicker method materializes the records for the query. You can also chain standard DataMapper query methods onto the #by_sql call to refine the query.
= Cirron Cirron measures a piece of Ruby code and reports back several performance counters: CPU instruction count, branch misses, page faults and time spent measuring. It uses the Linux perf events interface or @ibireme's KPC demo[https://gist.github.com/ibireme/173517c208c7dc333ba962c1f0d67d12] on OSX. It can also trace syscalls using +strace+, Linux only! == Prerequisites - Linux with perf events support / Apple ARM OSX - C++ - Ruby 3.x == Usage === Performance Counters $ sudo irb irb(main):001> require 'cirron' => true irb(main):002* c = Cirron::collector do irb(main):003* puts "Hello" irb(main):004> end Hello => Counter(time_enabled_ns: 110260, instruction_count: 15406, branch_misses: 525, page_faults: 0) === Tracing Syscalls $ sudo irb irb> require 'cirron' => true irb> trace = Cirron::tracer do irb> # Your code here irb> puts "Hello" irb> end => [#<Syscall:0x00007c6c1a4b3608 @args="1, [{iov_base=\"Hello\", iov_len=5}, {iov_base=\"\\n\", iov_len=1}], 2", @duration="0.000201", @name="writev", @pid="2261962", @retval="6", @timestamp="1720285300.334976">] # Save the trace for ingesting to Perfetto irb> File.write("/tmp/trace", Cirron::to_tef(trace)) => 267 === Tampering with Syscalls Available tampering actions are: error: Inject a fault with the specified errno. retval: Inject a success with the specified return value. signal: Deliver the specified signal on syscall entry. delay_enter: Delay syscall entry by the specified time. delay_exit: Delay syscall exit by the specified time. poke_enter: Modify memory at argN on syscall entry. poke_exit: Modify memory at argN on syscall exit. syscall: Inject a different syscall instead. The when argument can be used to specify when to perform the tampering. See the Tampering section of the [strace manual page](https://man7.org/linux/man-pages/man1/strace.1.html) for more detailed explanaition of the arguments. ``` $ sudo irb irb> require 'cirron' irb> injector = Cirron.injector irb> injector.inject("openat", "error", "ENOSPC") irb> injector.inject("openat", "delay_enter", "1s", when_condition="2+2") irb> injector.run do irb> # Open now fails with "No space left on device" and every irb> # other call to `openat` will be delayed by 1s. irb> File.open("test.txt", "w") irb> end ``` == Additional Information For more detailed information, please visit the project's GitHub page: https://github.com/s7nfo/Cirron
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.