Sha256: 1e20ee4cdb541a6cc4789706cf06f8774f2c5fe2f68f444107ebee0ed102e52c

Contents?: true

Size: 1 KB

Versions: 5

Compression:

Stored size: 1 KB

Contents

#!/usr/bin/env ruby -I.. -I.
DEBUG_LVL = 0
$config_file='config.yaml'
require 'QooxView'
require 'st_dummy'


Permission.add( 'default', 'View,View.Login' )
Permission.add( 'admin', '.*' )
Permission.add( 'internet', 'Internet,PersonShow', 'default' )
Permission.add( 'student', '', 'internet' )
Permission.add( 'professor', '', 'student' )
Permission.add( 'secretary', 'PersonModify,FlagAddInternet', 'professor' )

QooxView.init( 'entities', 'views' )

require 'rubygems'
require 'perftools'
PerfTools::CpuProfiler.start("/tmp/profile.create") do
  Entities.delete_all_data()
  Benchmark.bm{|x|
			
    (0..4).each{|b|
      x.report( "Users #{(b*50).to_s.rjust(3)}" ){
        (1..50).each{|i|
          Entities.Persons.create( :first_name => "admin#{b*50+i}", :pass => "super123", :session_id => '0.1', :permission => 'admin' )
        }
      }
    }
  }
end

puts 'Now run the following:
    pprof.rb --pdf /tmp/profile.create > /tmp/profile.create.pdf
    open /tmp/profile.create.pdf
    CPUPROFILE_FREQUENCY=500
'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
qooxview-1.9.1312 test/benchmark_creation.rb
qooxview-1.9.13.pre.12 test/benchmark_creation.rb
qooxview-1.9.13.pre.11 test/benchmark_creation.rb
qooxview-1.9.13.pre.10 test/benchmark_creation.rb
qooxview-1.9.11 test/benchmark_creation.rb