Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
38
third-party/vendor/swc_common/tests/source_map.rs
vendored
Normal file
38
third-party/vendor/swc_common/tests/source_map.rs
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#![cfg(feature = "concurrent")]
|
||||
|
||||
use rayon::{prelude::*, ThreadPoolBuilder};
|
||||
use swc_common::{FileName, FilePathMapping, SourceMap};
|
||||
|
||||
#[test]
|
||||
fn stress() {
|
||||
let _ = ThreadPoolBuilder::new().num_threads(100).build_global();
|
||||
let fm = SourceMap::new(FilePathMapping::empty());
|
||||
|
||||
(0..10000).into_par_iter().for_each(|_| {
|
||||
fm.new_source_file(
|
||||
FileName::Anon,
|
||||
"@Entity()
|
||||
export class Product extends TimestampedEntity {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
public id!: string;
|
||||
|
||||
@Column()
|
||||
public price!: number;
|
||||
|
||||
@Column({ enum: ProductType })
|
||||
public type!: ProductType;
|
||||
|
||||
@Column()
|
||||
public productEntityId!: string;
|
||||
|
||||
/* ANCHOR: Relations ------------------------------------------------------ */
|
||||
@OneToMany(() => Order, (order) => order.product)
|
||||
public orders!: Order[];
|
||||
|
||||
@OneToMany(() => Discount, (discount) => discount.product)
|
||||
public discounts!: Discount[];
|
||||
}"
|
||||
.into(),
|
||||
);
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue