I'd like to streamline the code more than a bit to get it to run faster.
There's a thread about this and related issues of mine on the Cygwin mailing-list, but I want to eliminate any chances it might just be inefficient/inelegant/crappy code. A previous run of the same script on both Cygwin and Ubuntu 9.04's GNOME Terminal, using a source file and a list file of equal length and content, had a significant difference in execution time (2m20s versus just under 3/4 of an hour, GNOME:Cygwin).
The code:
I wouldn't pick on this script for any other reason than: since uninstalling one or two binaries from the Cygwin mirrors and from elsewhere, this is the only script (written by YT within the last two months ) that consistently raises CPU usage, as observed in Task Manager by me, to between 94 and 100% usage while it's being executed. Which is Cygwin "biting itself in the a**," to coin a phrase; the longer the cycle time the longer it takes for a script to finish.
Anyone's advice on how to streamline the code would be much appreciated.
Hi, all,
I try to run a quite simple bash script mytest.sh in cygwin, it's content is:
#!/bin/bash
echo "It is my first bash shell"
there are three lines in the script. The second line is blank line.
When I run it use command: bash c:/mytest.sh, ... (6 Replies)
I'm writing a bash script to log some selections from a sensors output (core temp, mb temp, etc.) and I would also like to have the current cpu usage as a percentage. I have no idea how to go about getting it in a form that a bash script can use. For example, I would simply look in the output of... (3 Replies)
I wrote a very simple script that matches combinations of alphabetic characters (1-5). I want to use it to test CPU speeds of different hardware/platforms. The problem is that on multi-core/processor systems, only one CPU is being utilized to execute the script. Is there a way to change that?... (16 Replies)
Hello everyone,
I am struggling a bit with a batch script that I need to run in cygwin. I work in winXP and I had to write some awk scripts to do some file manipulation, and now I would like to automate the process by just running a batch file so that my colleagues can use it easily.
Now, the... (2 Replies)
Hi guys,
I'm basically looking for some help with a bash script I've written. It's purpose is to assign process to individual CPU cores once that process hits 15% CPU usage or more. If it drops below 15%, it's unassigned again (using taskset).
My problem is that I can't think of a way to... (2 Replies)
I'm using Notepad++ to edit my BASH scripts and using CYGWIN to run them from Windows7.
In Notepad++ there is a 'Run' capability. How do I get this to run my scripts directly without having to enter the script name from the Cygwin command line? (3 Replies)
As stated, I am looking into keeping my backup drive unmounted in normal windows use. Partly this is to address threats like cryptolocker. Since one of my backup drives is an internal drive, it will not likely afford any protection from such a threat. I am thinking of adding code to my rsync script... (5 Replies)
All,
Have a weird issue where i need to generate a report from GitHub monthly detailing user accounts and the last time they logged in. I'm using a windows box to do this (work issued) and would like to know if anyone has any experience scripting for GitAPI using windows / cygwin / powershell?... (9 Replies)
Hi everybody,
First, I'm sorry for my bad english!
I have the following situation:
I have a Windows 2012 R2 with Cygwin installed. The Windows Server is used as a backup Server with Dell AppAssure installed. At the moment, AppAssure saves Backup Targets to a repository on his D. The... (9 Replies)
I am trying to use a batch file to automatically execute a bash script with no luck this far.
The batch script looks like this:
C:\Cygwin64\bin\bash test.sh
I have also tried this:
C:\Cygwin64\bin\bash "C:\Cygwin64\bin\test.sh"
Needless to say that the windows box has Cygwin... (7 Replies)
Discussion started by: Xterra
7 Replies
LEARN ABOUT CENTOS
__gnu_pbds::priority_queue
__gnu_pbds::priority_queue< _Tv, Cmp_Fn, Tag, _Alloc >(3) Library Functions Manual __gnu_pbds::priority_queue< _Tv, Cmp_Fn, Tag, _Alloc >(3)
NAME
__gnu_pbds::priority_queue< _Tv, Cmp_Fn, Tag, _Alloc > -
SYNOPSIS
Inherits type< _Tv, Cmp_Fn, _Alloc, Tag >.
Public Types
typedef _Alloc allocator_type
typedef Cmp_Fn cmp_fn
typedef base_type::const_iterator const_iterator
typedef __rebind_va::const_pointer const_pointer
typedef
__rebind_va::const_reference const_reference"
typedef Tag container_category
typedef
allocator_type::difference_type difference_type"
typedef base_type::iterator iterator
typedef
base_type::point_const_iterator point_const_iterator"
typedef base_type::point_iterator point_iterator
typedef __rebind_va::pointer pointer
typedef __rebind_va::reference reference
typedef allocator_type::size_type size_type
typedef _Tv value_type
Public Member Functions
priority_queue (const cmp_fn &r_cmp_fn)
template<typename It > priority_queue (It first_it, It last_it)
template<typename It > priority_queue (It first_it, It last_it, const cmp_fn &r_cmp_fn)
priority_queue (const priority_queue &other)
priority_queue & operator= (const priority_queue &other)
void swap (priority_queue &other)
Detailed Description
template<typename _Tv, typename Cmp_Fn = std::less<_Tv>, typename Tag = pairing_heap_tag, typename _Alloc = std::allocator<char>>class
__gnu_pbds::priority_queue< _Tv, Cmp_Fn, Tag, _Alloc >
A priority queue composed of one specific heap policy.
Template Parameters:
_Tv Value type.
Cmp_Fn Comparison functor.
Tag Instantiating data structure type, see container_tag.
_Alloc Allocator type.
Base is dispatched at compile time via Tag, from the following choices: binary_heap_tag, binomial_heap_tag, pairing_heap_tag,
rc_binomial_heap_tag, thin_heap_tag
Base choices are: detail::binary_heap, detail::binomial_heap, detail::pairing_heap, detail::rc_binomial_heap, detail::thin_heap.
Definition at line 83 of file priority_queue.hpp.
Author
Generated automatically by Doxygen for libstdc++ from the source code.
libstdc++ Tue Jun 10 2014 __gnu_pbds::priority_queue< _Tv, Cmp_Fn, Tag, _Alloc >(3)