Class: GroongaQueryLog::ServerVerifier::Options
- Inherits:
-
Object
- Object
- GroongaQueryLog::ServerVerifier::Options
- Defined in:
- lib/groonga-query-log/server-verifier.rb
Instance Attribute Summary collapse
- #cancel_max_wait ⇒ Object
-
#care_order ⇒ Object
Returns the value of attribute care_order.
-
#debug_rewrite ⇒ Object
writeonly
Sets the attribute debug_rewrite.
-
#disable_cache ⇒ Object
writeonly
Sets the attribute disable_cache.
-
#groonga1 ⇒ Object
readonly
Returns the value of attribute groonga1.
-
#groonga2 ⇒ Object
readonly
Returns the value of attribute groonga2.
-
#ignored_drilldown_keys ⇒ Object
Returns the value of attribute ignored_drilldown_keys.
-
#max_limit ⇒ Object
Returns the value of attribute max_limit.
-
#n_clients ⇒ Object
Returns the value of attribute n_clients.
-
#nullable_reference_number_accessors ⇒ Object
Returns the value of attribute nullable_reference_number_accessors.
- #omit_rate ⇒ Object
-
#output_path ⇒ Object
Returns the value of attribute output_path.
-
#performance_verifier_options ⇒ Object
readonly
Returns the value of attribute performance_verifier_options.
- #request_queue_size ⇒ Object
-
#rewrite_and_not_operator ⇒ Object
writeonly
Sets the attribute rewrite_and_not_operator.
-
#rewrite_not_or_regular_expression ⇒ Object
writeonly
Sets the attribute rewrite_not_or_regular_expression.
-
#rewrite_nullable_reference_number ⇒ Object
writeonly
Sets the attribute rewrite_nullable_reference_number.
-
#rewrite_vector_equal ⇒ Object
writeonly
Sets the attribute rewrite_vector_equal.
-
#rewrite_vector_not_equal_empty_string ⇒ Object
writeonly
Sets the attribute rewrite_vector_not_equal_empty_string.
-
#stop_on_failure ⇒ Object
writeonly
Sets the attribute stop_on_failure.
-
#target_command_names ⇒ Object
Returns the value of attribute target_command_names.
-
#vector_accessors ⇒ Object
Returns the value of attribute vector_accessors.
-
#verify_cache ⇒ Object
writeonly
Sets the attribute verify_cache.
-
#verify_cancel ⇒ Object
writeonly
Sets the attribute verify_cancel.
-
#verify_performance ⇒ Object
writeonly
Sets the attribute verify_performance.
Instance Method Summary collapse
- #debug_rewrite? ⇒ Boolean
- #disable_cache? ⇒ Boolean
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #need_filter_rewrite? ⇒ Boolean
- #open_output(&block) ⇒ Object
- #rewrite_and_not_operator? ⇒ Boolean
- #rewrite_not_or_regular_expression? ⇒ Boolean
- #rewrite_nullable_reference_number? ⇒ Boolean
- #rewrite_vector_equal? ⇒ Boolean
- #rewrite_vector_not_equal_empty_string? ⇒ Boolean
- #stop_on_failure? ⇒ Boolean
- #target_command_name?(name) ⇒ Boolean
- #to_filter_rewriter_options ⇒ Object
- #verify_cache? ⇒ Boolean
- #verify_cancel? ⇒ Boolean
- #verify_performance? ⇒ Boolean
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/groonga-query-log/server-verifier.rb', line 366 def initialize @groonga1 = GroongaOptions.new @groonga2 = GroongaOptions.new @n_clients = 8 @request_queue_size = nil @disable_cache = false @output_path = nil @output_opened = false @target_command_names = [ "io_flush", "logical_count", "logical_range_filter", "logical_shard_list", "logical_select", "normalize", "object_exist", "select", "status", ] @care_order = true @verify_cache = false @ignored_drilldown_keys = [] @stop_on_failure = false @rewrite_vector_equal = false @rewrite_vector_not_equal_empty_string = false @vector_accessors = [] @rewrite_nullable_reference_number = false @nullable_reference_number_accessors = [] @rewrite_not_or_regular_expression = false @rewrite_and_not_operator = false @verify_performance = false @performance_verifier_options = PerformanceVerifier::Options.new @debug_rewrite = false @omit_rate = 0.0 @max_limit = -1 @verify_cancel = false @cancel_max_wait = 5.0 end |
Instance Attribute Details
#cancel_max_wait ⇒ Object
507 508 509 |
# File 'lib/groonga-query-log/server-verifier.rb', line 507 def cancel_max_wait @cancel_max_wait end |
#care_order ⇒ Object
Returns the value of attribute care_order.
348 349 350 |
# File 'lib/groonga-query-log/server-verifier.rb', line 348 def care_order @care_order end |
#debug_rewrite=(value) ⇒ Object (writeonly)
Sets the attribute debug_rewrite
361 362 363 |
# File 'lib/groonga-query-log/server-verifier.rb', line 361 def debug_rewrite=(value) @debug_rewrite = value end |
#disable_cache=(value) ⇒ Object (writeonly)
Sets the attribute disable_cache
345 346 347 |
# File 'lib/groonga-query-log/server-verifier.rb', line 345 def disable_cache=(value) @disable_cache = value end |
#groonga1 ⇒ Object (readonly)
Returns the value of attribute groonga1.
341 342 343 |
# File 'lib/groonga-query-log/server-verifier.rb', line 341 def groonga1 @groonga1 end |
#groonga2 ⇒ Object (readonly)
Returns the value of attribute groonga2.
342 343 344 |
# File 'lib/groonga-query-log/server-verifier.rb', line 342 def groonga2 @groonga2 end |
#ignored_drilldown_keys ⇒ Object
Returns the value of attribute ignored_drilldown_keys.
350 351 352 |
# File 'lib/groonga-query-log/server-verifier.rb', line 350 def ignored_drilldown_keys @ignored_drilldown_keys end |
#max_limit ⇒ Object
Returns the value of attribute max_limit.
363 364 365 |
# File 'lib/groonga-query-log/server-verifier.rb', line 363 def max_limit @max_limit end |
#n_clients ⇒ Object
Returns the value of attribute n_clients.
343 344 345 |
# File 'lib/groonga-query-log/server-verifier.rb', line 343 def n_clients @n_clients end |
#nullable_reference_number_accessors ⇒ Object
Returns the value of attribute nullable_reference_number_accessors.
356 357 358 |
# File 'lib/groonga-query-log/server-verifier.rb', line 356 def nullable_reference_number_accessors @nullable_reference_number_accessors end |
#omit_rate ⇒ Object
499 500 501 |
# File 'lib/groonga-query-log/server-verifier.rb', line 499 def omit_rate @omit_rate end |
#output_path ⇒ Object
Returns the value of attribute output_path.
347 348 349 |
# File 'lib/groonga-query-log/server-verifier.rb', line 347 def output_path @output_path end |
#performance_verifier_options ⇒ Object (readonly)
Returns the value of attribute performance_verifier_options.
360 361 362 |
# File 'lib/groonga-query-log/server-verifier.rb', line 360 def @performance_verifier_options end |
#request_queue_size ⇒ Object
405 406 407 |
# File 'lib/groonga-query-log/server-verifier.rb', line 405 def request_queue_size @request_queue_size || @n_clients * 3 end |
#rewrite_and_not_operator=(value) ⇒ Object (writeonly)
Sets the attribute rewrite_and_not_operator
358 359 360 |
# File 'lib/groonga-query-log/server-verifier.rb', line 358 def rewrite_and_not_operator=(value) @rewrite_and_not_operator = value end |
#rewrite_not_or_regular_expression=(value) ⇒ Object (writeonly)
Sets the attribute rewrite_not_or_regular_expression
357 358 359 |
# File 'lib/groonga-query-log/server-verifier.rb', line 357 def rewrite_not_or_regular_expression=(value) @rewrite_not_or_regular_expression = value end |
#rewrite_nullable_reference_number=(value) ⇒ Object (writeonly)
Sets the attribute rewrite_nullable_reference_number
355 356 357 |
# File 'lib/groonga-query-log/server-verifier.rb', line 355 def rewrite_nullable_reference_number=(value) @rewrite_nullable_reference_number = value end |
#rewrite_vector_equal=(value) ⇒ Object (writeonly)
Sets the attribute rewrite_vector_equal
352 353 354 |
# File 'lib/groonga-query-log/server-verifier.rb', line 352 def rewrite_vector_equal=(value) @rewrite_vector_equal = value end |
#rewrite_vector_not_equal_empty_string=(value) ⇒ Object (writeonly)
Sets the attribute rewrite_vector_not_equal_empty_string
353 354 355 |
# File 'lib/groonga-query-log/server-verifier.rb', line 353 def rewrite_vector_not_equal_empty_string=(value) @rewrite_vector_not_equal_empty_string = value end |
#stop_on_failure=(value) ⇒ Object (writeonly)
Sets the attribute stop_on_failure
351 352 353 |
# File 'lib/groonga-query-log/server-verifier.rb', line 351 def stop_on_failure=(value) @stop_on_failure = value end |
#target_command_names ⇒ Object
Returns the value of attribute target_command_names.
346 347 348 |
# File 'lib/groonga-query-log/server-verifier.rb', line 346 def target_command_names @target_command_names end |
#vector_accessors ⇒ Object
Returns the value of attribute vector_accessors.
354 355 356 |
# File 'lib/groonga-query-log/server-verifier.rb', line 354 def vector_accessors @vector_accessors end |
#verify_cache=(value) ⇒ Object (writeonly)
Sets the attribute verify_cache
349 350 351 |
# File 'lib/groonga-query-log/server-verifier.rb', line 349 def verify_cache=(value) @verify_cache = value end |
#verify_cancel=(value) ⇒ Object (writeonly)
Sets the attribute verify_cancel
364 365 366 |
# File 'lib/groonga-query-log/server-verifier.rb', line 364 def verify_cancel=(value) @verify_cancel = value end |
#verify_performance=(value) ⇒ Object (writeonly)
Sets the attribute verify_performance
359 360 361 |
# File 'lib/groonga-query-log/server-verifier.rb', line 359 def verify_performance=(value) @verify_performance = value end |
Instance Method Details
#debug_rewrite? ⇒ Boolean
495 496 497 |
# File 'lib/groonga-query-log/server-verifier.rb', line 495 def debug_rewrite? @debug_rewrite end |
#disable_cache? ⇒ Boolean
409 410 411 |
# File 'lib/groonga-query-log/server-verifier.rb', line 409 def disable_cache? @disable_cache end |
#need_filter_rewrite? ⇒ Boolean
466 467 468 469 470 471 472 |
# File 'lib/groonga-query-log/server-verifier.rb', line 466 def need_filter_rewrite? rewrite_vector_equal? or rewrite_vector_not_equal_empty_string? or rewrite_nullable_reference_number? or rewrite_not_or_regular_expression? or rewrite_and_not_operator? end |
#open_output(&block) ⇒ Object
451 452 453 454 455 456 457 458 459 460 461 462 463 464 |
# File 'lib/groonga-query-log/server-verifier.rb', line 451 def open_output(&block) if @output_path if @output_opened mode = "a" else FileUtils.mkdir_p(File.dirname(@output_path)) mode = "w" @output_opened = true end File.open(@output_path, mode, &block) else yield($stdout) end end |
#rewrite_and_not_operator? ⇒ Boolean
437 438 439 |
# File 'lib/groonga-query-log/server-verifier.rb', line 437 def rewrite_and_not_operator? @rewrite_and_not_operator end |
#rewrite_not_or_regular_expression? ⇒ Boolean
433 434 435 |
# File 'lib/groonga-query-log/server-verifier.rb', line 433 def rewrite_not_or_regular_expression? @rewrite_not_or_regular_expression end |
#rewrite_nullable_reference_number? ⇒ Boolean
429 430 431 |
# File 'lib/groonga-query-log/server-verifier.rb', line 429 def rewrite_nullable_reference_number? @rewrite_nullable_reference_number end |
#rewrite_vector_equal? ⇒ Boolean
421 422 423 |
# File 'lib/groonga-query-log/server-verifier.rb', line 421 def rewrite_vector_equal? @rewrite_vector_equal end |
#rewrite_vector_not_equal_empty_string? ⇒ Boolean
425 426 427 |
# File 'lib/groonga-query-log/server-verifier.rb', line 425 def rewrite_vector_not_equal_empty_string? @rewrite_vector_not_equal_empty_string end |
#stop_on_failure? ⇒ Boolean
417 418 419 |
# File 'lib/groonga-query-log/server-verifier.rb', line 417 def stop_on_failure? @stop_on_failure end |
#target_command_name?(name) ⇒ Boolean
441 442 443 444 445 446 447 448 449 |
# File 'lib/groonga-query-log/server-verifier.rb', line 441 def target_command_name?(name) return false if name.nil? @target_command_names.any? do |name_pattern| flags = 0 flags |= File::FNM_EXTGLOB if File.const_defined?(:FNM_EXTGLOB) File.fnmatch(name_pattern, name, flags) end end |
#to_filter_rewriter_options ⇒ Object
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/groonga-query-log/server-verifier.rb', line 474 def { :rewrite_vector_equal => rewrite_vector_equal?, :rewrite_vector_not_equal_empty_string => rewrite_vector_not_equal_empty_string?, :vector_accessors => vector_accessors, :rewrite_nullable_reference_number => rewrite_nullable_reference_number?, :nullable_reference_number_accessors => nullable_reference_number_accessors, :rewrite_not_or_regular_expression => rewrite_not_or_regular_expression?, :rewrite_and_not_operator => rewrite_and_not_operator?, } end |
#verify_cache? ⇒ Boolean
413 414 415 |
# File 'lib/groonga-query-log/server-verifier.rb', line 413 def verify_cache? @verify_cache end |
#verify_cancel? ⇒ Boolean
503 504 505 |
# File 'lib/groonga-query-log/server-verifier.rb', line 503 def verify_cancel? @verify_cancel end |
#verify_performance? ⇒ Boolean
491 492 493 |
# File 'lib/groonga-query-log/server-verifier.rb', line 491 def verify_performance? @verify_performance end |