Skip to content

Tidbit CLI arguments

Igor Zhutaiev edited this page Sep 21, 2016 · 7 revisions

Parameters Description and comments

Parameter Required? Default Name Description Comments
-l yes 1000 Load Factor Load Factor is used to modify total number of records that will be created for each module. The ratio between Accounts and the other modules is set in install_config.php. One of the most useful parameters to check when your are going to generate a large number of records for a Sugar instance.
-u yes 100 Number of Users The number of Users to generate. If not specified, then the number of users is 1/10th of loadFactor. Also affects on Number of Teams that will be created.
-o no false Obliterate Mode When set, turns on Obliterate Mode. All existing records and relationships in the Sugar database will be emptied. The administrator account will be all that remains. Obliterate mode is recommended when trying Tidbit out, playing around with custom data generation, or for testing Tidbit customizations
-c no false Cleaning Mode When set, turns on Clean Mode. Any existing demo data will be removed. No Data created within the app will be affected and the administrator account will not be deleted. This option has no effect if Obliterate Mode is enabled. Cleaning mode is used to remove data that was previously generated with Tidbit before re-populating with new data.
-t no false Turbo Mode* When set, turns on Turbo Mode. Records are produced in groups of 1,000 duplicates. Users and teams are not affected. This results in faster data generation but can cause other issues due to duplicate records. * Not recommended.
-e no false Existing Users Mode When set, turns Existing Users Mode on. Regardless of other settings, no Users or Teams will be created or modified. Any new data created will be assigned and associated with existing Users and Teams. The number of users that would normally be created is assumed to be the number of existing users. Useful for appending data onto an existing data set.
--as_populate no false Activity Stream Population When enabled, Tidbit will populates ActivityStream records for each user and module. See --as_last_rec --as_number and --as_buffer params for additional controls over AS population.
--as_last_rec yes all AS Last Records Populate activity stream for last N records in module Works with --as_populate key only. Populate last N records of each module. By default, all available records are populated with activities.
--as_number yes 10 Activity Number Works with --as_populate key only. Sets the number of ActivityStream records to be created for each module record. The default is 10.
--as_buffer yes 1000 Activity Stream Insert Buffer Works with --as_populate key only. Sets the size of ActivityStream insertion buffer (default 1000) Increasing default is recommended but may require increasing of MySQL insert buffer size too or other storage options
--storage yes mysql Storage Type Storage name, you have next options: mysql oracle, db2 or csv Based on your environment, you need to decide which storage type should be used
-d no false Debug Mode Enables Debug Mode. With Debug Mode, all queries will be logged in a file called 'executedQueries.txt' in your Tidbit folder. Often needed by developers customizing Tidbit.
-x yes 0 Commit batch How often to commit module records - important on some DBs like IBM DB2. Default behavior is to not batch.
-s yes 10 TeamSet Size Specify the number of teams per team set and per record
--fullteamset no false Full TeamSets When enabled, builds fully intersected teamset list.
--with-tags no false Tag generation When enabled, creates Tags and relationships. Works for Sugar 7.7+.
--insert_batch_size yes 20 Insert Buffer Number of VALUES to be added to one INSERT statement for bean data. Does Not include relations for now. Depends on storage type Increasing default is recommended but may require increasing of MySQL insert buffer size too
--allmodules no false All Modules Automatically detect all installed modules and generate data for them. While this option exists, it is recommended to explicitly set up modules in config file
--allrelationships no false All Relationships Automatically detect all relationships and generate data for them. While this option exists, it is recommended to explicitly set up relationships in the config file.

Parameters Combination examples

Please note that examples are using ./bin/tidbit. When Tidbit installed globally just tidbit should be used. If Tidbit is part of your application (installed as dependency) - please use ./vendor/bin/tidbit

Clean out existing seed data when generating new data set:

$ ./bin/tidbit -- -c

Insert 500 users:

$ ./bin/tidbit -- -u 500

Obliterate all data when generating new records with 400 users:

$ ./bin/tidbit -- -o -u 400

Create data using a load factor of 10, automatically detecting modules and automatically adding relationships.

$ ./bin/tidbit -- -l 10 -o --allmodules --allrelationships

Generate TeamBasedACL action restrictions for chosen level

$ ./bin/tidbit -- -o --tba -tba_level full

Controlling INSERT_BATCH_SIZE (MySQL Support only for now)

$ ./bin/tidbit -- -o --insert_batch_size 1000

Using DB2 storage example (mysql/oracle/db2 can be used, depending on Sugar installation and DB usage)

$ ./bin/tidbit -- -o --sugar_path /some/sugar/path --storage db2