如何在命令行模式下运行时向JMeter csv结果文件添加日期(How to add date to JMeter csv result file while running in command line mode)
在命令行模式下运行测试时,如何将实际日期添加到JMeter csv结果文件的文件名中? 例如
jmeter -n -t ~/tests/TP_Login_api.jmx -Jusers=12 -Jhost=devops1 -Juser_file=users_max.csv -Jaccount=max -l /results/results_TP_Login_api_${__time(yyyyMMdd-HHmmss)}.csv -e -o/results/report/TP_Login_api
任何想法如何实现这一点?
How can I add the actual date to the file name of a JMeter csv result file while running the test in command line mode? E.g.
jmeter -n -t ~/tests/TP_Login_api.jmx -Jusers=12 -Jhost=devops1 -Juser_file=users_max.csv -Jaccount=max -l /results/results_TP_Login_api_${__time(yyyyMMdd-HHmmss)}.csv -e -o/results/report/TP_Login_api
Any ideas how dto achieve that?
原文:https://stackoverflow.com/questions/45963393
最满意答案
这可以。 您需要考虑的一件事是,如果删除了带孩子的评论该怎么办。 FK约束将阻止删除,并且级联删除的常见解决方案在这里似乎不合适,也不会使父引用为NULL。 因此,您可能必须保留已删除的注释,并清除内容或以其他方式将其标记为已删除。
This is fine. One thing you'll need to consider is what to do if a comment with children is deleted. The FK constraint will prevent deletions, and the common solution of cascading the delete doesn't seem appropriate here, nor does NULL-ing out the parent reference. So you probably have to keep the deleted comment, and just clear out the contents or otherwise mark it as deleted.
相关问答
更多-
非主键的外键(Foreign Key to non-primary key)[2022-07-21]
如果你真的想要创建非主键的外键,它必须是一个对它有唯一约束的列。 在线图书 : FOREIGN KEY约束不必仅与另一个表中的PRIMARY KEY约束相关联; 也可以定义它来引用另一个表中的UNIQUE约束的列。 所以在你的情况下,如果你使AnotherID唯一,它将被允许。 如果你不能应用一个独特的约束,你就不幸了,但是如果你考虑到这一点,这真的是有道理的。 虽然如上所述,如果你有一个完美的主键作为候选键,为什么不使用它? If you really want to create a foreign k ... -
约束不是密钥的补充,而是定义密钥。 当你问“应该何时将CONSTRAINT置于主键或辅助键上?” 你对这种情况的看法不正确。 没有约束,您没有密钥。 换句话说,没有可以拥有没有约束的密钥的情况。 如果没有约束,则无论您决定为列命名,都没有密钥。 The constraint is not an addition to the key, it is defining the key. When you ask "when should the CONSTRAINT be placed on a primary ...
-
正如评论中所提到的,Projet表上的主键是“复合键”(需要多个列来强制唯一性)。 因此,要使您的外键工作,您需要从Project的主键中删除“TypeProjet”(假设CodeProjet足以唯一地标识Projet),或者您需要将TypeProjet添加到Inscription表并定义您的具有两列的外键,例如: create table Inscription ( NumEmploye int foreign key references Employe(NumEmploye), CodeP ...
-
对于MS Access,您需要使用CONSTRAINT关键字,如: CREATE TABLE Employees ( P_Id INTEGER NOT NULL, Super_Id INTEGER NOT NULL, PRIMARY KEY(P_Id), CONSTRAINT FK_SuperId FOREIGN KEY (Super_Id) REFERENCES Employees(P_Id) ); For MS Access, you need to use CONS ...
-
在同一个表的主键上创建外键约束的不良做法?(Bad practice to create a foreign key constraint on primary key of the same table?)[2023-09-01]
这可以。 您需要考虑的一件事是,如果删除了带孩子的评论该怎么办。 FK约束将阻止删除,并且级联删除的常见解决方案在这里似乎不合适,也不会使父引用为NULL。 因此,您可能必须保留已删除的注释,并清除内容或以其他方式将其标记为已删除。 This is fine. One thing you'll need to consider is what to do if a comment with children is deleted. The FK constraint will prevent deletio ... -
MySQL - 在同一个表中受主键约束的外键,错误#1452(MySQL - foreign key constrained by primary key in same table, error #1452)[2022-02-18]
这将创建一个循环外键,这将防止任何插入表。 FOREIGN KEY(cat_id) REFERENCES categories(cat_id), 编辑:也许你打算把PK放在cat_parent_id ? This will create a circular foreign key, which will prevent any insertion into the table. FOREIGN KEY(cat_id) REFERENCES categories(cat_id), EDIT: ... -
我已经弄明白了,谢谢。 CREATE TABLE [dbo].[EventChildren] ( [EventId] [uniqueidentifier] NOT NULL, [EventChildId] [uniqueidentifier] NOT NULL, [Enabled] [bit] NOT NULL, CONSTRAINT [EventEvents] PRIMARY KEY CLUSTERED ( [EventId] ASC, [EventChildId] ASC )W ...
-
你不应该将主键id作为外键。 重构它是这样的 CREATE TABLE IF NOT EXISTS WORKERS ( ID CHAR(8) NOT NULL PRIMARY KEY, USER_ID CHAR(8) NOT NULL, DATE_START TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, DATE_END TIMESTAMP NULL, ...
-
由mysql返回的错误是误导性的 要查找特定错误,请执行以下操作: SHOW ENGINE INNODB STATUS; error returned by the mysql is misleading To find the specific error run this: SHOW ENGINE INNODB STATUS;
-
您可以将外键约束声明为DEFERRABLE ,这允许您在事务结束时检查约束。 SET TRANSACTION; SET CONSTRAINTS ALL DEFERRED; INSERT INTO TABLE_ONE (PK1, FK2, NAME) VALUES(10, 20, 'Foo'); INSERT INTO TABLE_TWO (PK2, FK3, NAME) VALUES(20, 30, 'Bar'); INSERT INTO TA ...