extent-framework / klov

Report server for ExtentReports
http://klov.herokuapp.com
38 stars 32 forks source link

Klov Reporter - Possiblity to maintain max number of launches in database #73

Open rajeshpatil74 opened 3 years ago

rajeshpatil74 commented 3 years ago

With Klov reporting, every launch stores the test results in mongodb.

Is it possible to maintain only last 25 or 50 launches in the database, so database size growing can be restricted. The property should be configurable.

filipwoz commented 3 years ago

Or to define some archive rules per project like:

filipwoz commented 3 years ago

Additionally observed that the new KLOV also has the same issue as the old one: When database is growing the performance of loading the reports is continuously falling until it exceeds user acceptance boarder. I tried to help myself by deleting KLOV projects of by deleting reports from a given project by date older then this way:

db.log.remove({$and: [{"project":ObjectId("607954348459090c083dec1f")},{"timestamp":{$lte:ISODate("2021-04-25 00:00:00")}}]})
db.test.remove({$and: [{"project":ObjectId("607954348459090c083dec1f")},{"startTime":{$lte:ISODate("2021-04-25 00:00:00")}}]})
db.report.remove({$and: [{"project":ObjectId("607954348459090c083dec1f")},{"startTime":{$lte:ISODate("2021-04-25 00:00:00")}}]})

but this should really be a part of the solution to offer deletion of old stuff!