Skip to content

Commit

Permalink
Added Benerator files
Browse files Browse the repository at this point in the history
  • Loading branch information
suarezgpablo committed Dec 16, 2024
1 parent 220b5fd commit 0a7d8aa
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 8 deletions.
18 changes: 10 additions & 8 deletions setup/benerator/custom.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<setup>
<import platforms="db" domains="person,organization"/>
<database id="db" url="jdbc:mysql://localhost:3306/custom" driver="com.mysql.jdbc.Driver" user="usersql" password="passwordsql"/>
<database id="db" url="jdbc:mysql://localhost:3306/custom" driver="com.mysql.jdbc.Driver" user="root" password="123456"/>
<iterate source="db" type="book" consumer="ConsoleExporter"/>
<generate type="author" count="1000" threads="1" consumer="db"/>

<generate type="book" count="1000" threads="1" consumer="db">
<variable name="person" generator="new PersonGenerator{minAgeYears='21', maxAgeYears='67',femaleQuota='0.5'}" />
<variable name="company" generator="CompanyNameGenerator" />
<attribute name="title" type="string"/>
<attribute name="publisher" type="string"/>
<attribute name="subtitle" type="string"/>

</generate>
<generate type="authorbook" count="1000" threads="1" consumer="db">
<reference name="idbook" targetType="author" source="db" distribution="random"/>
<reference name="idauthor" targetType="book" source="db" distribution="random"/>
</generate>
</setup>
<generate type="authorbook" count="1000" threads="1" consumer="db">
<reference name="idbook" targetType="author" source="db" distribution="random"/>
<reference name="idauthor" targetType="book" source="db" distribution="random"/>
</generate>

</setup>
38 changes: 38 additions & 0 deletions setup/benerator/minds.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<setup>
<import platforms="db" domains="person,organization"/>
<database id="db" url="jdbc:mysql://localhost:3306/minds" driver="com.mysql.cj.jdbc.Driver" user="root" password="123456"/>
<generate type="comments" count="100" threads="1" consumer="db">
<attribute name="parent_guid" type="string" maxLength = "25"/>
</generate>
<generate type="wire" count="100" threads="1" consumer="db">
<attribute name="timestamp" type="string" maxLength = "25"/>
<attribute name="method" type="string" maxLength = "25"/>
<attribute name="amount" type="string" maxLength = "25"/>
<attribute name="recurring" type="string" maxLength = "25"/>
<attribute name="status" type="string" maxLength = "25"/>
<attribute name="wei" type="string" maxLength = "25"/>
<attribute name="wei_amount" type="string" maxLength = "25"/>
<attribute name="description" type="string" maxLength = "25"/>
</generate>
<generate type="user" count="100" threads="1" consumer="db"/>
<generate type="entity" count="200" threads="1" consumer="db">
<id name="id" type="int"/>
<reference name="idwire" targetType="wire" source="db" distribution="random"/>
</generate>
<generate type="hashtag" count="100" threads="1" consumer="db">
<attribute name="hidden_since" type="string" maxLength = "25"/>
<reference name="iduser" targetType="user" source="db" distribution="random"/>
</generate>
<generate type="onchain" count="100" threads="1" consumer="db">
<attribute name="address" type="string" unique="true" maxLength = "25"/>
<reference name="iduser" targetType="user" source="db" distribution="random"/>
</generate>
<generate type="sendwyre" count="100" threads="1" consumer="db">
<reference name="iduser" targetType="user" source="db" distribution="random"/>
</generate>
<generate type="snapshot" count="100" threads="1" consumer="db">
<attribute name="type" type="string" maxLength = "25"/>
<attribute name="json_data" type="string" maxLength = "25"/>
</generate>

</setup>
26 changes: 26 additions & 0 deletions setup/benerator/thingsboard.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<setup>
<database id="db" url="jdbc:mysql://localhost:3306/thingsboard" driver="com.mysql.cj.jdbc.Driver" user="root" password="123456"/>
<generate type="entity" count="1000" threads="1" consumer="db">
<id name="id" type="int"/>

<attribute name="name" type="string" maxLength = "25"/>
<attribute name="type" type="string" maxLength = "25"/>
</generate>
<generate type="tenant" count="1000" threads="1" consumer="db">
<id name="ten_id" type="int"/>
<reference name="identity" targetType="entity" source="db" distribution="random"/>
</generate>
<generate type="customer" count="1000" threads="1" consumer="db">
<id name="cus_id" type="int"/>
<reference name="identity" targetType="entity" source="db" distribution="random"/>
</generate>
<generate type="device" count="1000" threads="1" consumer="db">
<id name="id" type="int"/>

<attribute name="dev_name" type="string" maxLength = "25"/>
<attribute name="dev_type" type="string" maxLength = "25"/>
<reference name="idcustomer" targetType="customer" source="db" distribution="random"/>
<reference name="idtenant" targetType="tenant" source="db" distribution="random"/>
</generate>

</setup>
14 changes: 14 additions & 0 deletions setup/benerator/wire.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<setup>
<database id="db" url="jdbc:mysql://localhost:3306/wire" driver="com.mysql.cj.jdbc.Driver" user="root" password="123456"/>
<generate type="scim" count="100" threads="1" consumer="db">
<id name="id" type="int"/>
<attribute name="json" type="string" maxLength = "25"/>
</generate>
<generate type="team" count="100" threads="1" consumer="db"/>
<generate type="user" count="100" threads="1" consumer="db">
<id name="id" type="int"/>
<attribute name="external" type="string" maxLength = "25"/>
<attribute name="expires_at" type="string" maxLength = "25"/>
<reference name="teamid" targetType="team" source="db" distribution="random"/>
</generate>
</setup>

0 comments on commit 0a7d8aa

Please sign in to comment.