search for: 1_000_000

Displaying 12 results from an estimated 12 matches for "1_000_000".

2006 Jul 05
2
[Newbie] The pickaxe book and benchmark
Hello, I was reading the pickaxe book and then I arrived to the chapter "When trouble strikes" in the Benchmark section. I have this code: #!/usr/bin/ruby -w require ''benchmark'' include Benchmark LOOP_COUNT = 1_000_000 bm(12) do |test| test.report("normal:") do LOOP_COUNT.times do |x| y = x +1 end end test.report("predefine:") do x = y = 0 LOOP_COUNT.times do |x| y = x + 1 end end end The "predefine" test is more fast than the &quo...
2006 Apr 22
4
Slice and dice plugin
...''Tiger''} As well as simple equality conditions, other tests such as more than, less than and contains can also be specified: Animals.find :first, :conditions => {:name_starts_with => ''Tig''} Animals.find :all, :conditions => {:population_more_than => 1_000_000} Conditions can be combined: endangered_tigers = Animals.find :all, :conditions => {:name_contains => ''Tiger'', :population_less_than => 10_000} These conditions can also be used in calculations and scoped queries: Animals.count :conditions => {:population_more_than...
2009 Jul 20
3
Limit RAM used by a perl script
I have a perl script which runs from a cron job. How would you limit the amount of RAM that this script is allowed to consume? Is there a ulimit setting that will accomplish this? If so does ulimit have to be run each time the script is run, or is there a way to set it permanently?
2007 Mar 09
5
memory leak in index build?
...#39;'') i << { :data=>tttt.to_s, :name=>name, :field1=>name, :field2=>name, :field3=>name, } } i.close i=Ferret::Index::IndexReader.new dir i.max_doc.times{|n| i.term_vector(n,:data).terms \ .inject(0){|sum,tvt| tvt.positions.size } > 1_000_000 and puts "heinous term count for #{i[n][:name]}" } seenterms=Set[] begin i.terms(:data).each{|term,df| seenterms.include? term and next i.term_docs_for(:data,term) seenterms << term } rescue Exception raise end
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...n the first part + of the tuple, and [0] in the second part. + + [get_version ~driver ()] returns the library version in the first + part of the tuple, and the version of the driver called [driver] + in the second part. + + The version numbers are encoded as + [major * 1_000_000 + minor * 1000 + release]. + *) + +val uuid_length : int + (** Length of packed UUIDs. *) + +val uuid_string_length : int + (** Length of UUID strings. *) + +type rw = [`R|`W] +type ro = [`R] + (** These + {{:https://caml.inria.fr/pub/ml-archives/caml-list/2004/07/80683af867cce6bf8fff273973f7...
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository, instead of having it around in the common submodule. The removal from common will happen later. Pino Toscano (2): common: Bundle the libvirt-ocaml library for use by virt-v2v build: switch embedded copy of libvirt-ocaml .gitignore | 2 + 3rdparty/libvirt-ocaml/Makefile.am |
2018 Nov 27
8
[PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 Jan 30
8
[PATCH v3 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 May 20
8
[PATCH v5 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all
2019 Apr 08
12
[PATCH 43 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2018 Aug 30
8
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not