innogames / ltc

Online web application-dashboard for report analyzing,running and online monitoring of load tests started with JMeter
MIT License
197 stars 96 forks source link

Is there anyway to push the data from jmeter to Analyze without using internal controller #5

Closed rteja91 closed 6 years ago

rteja91 commented 6 years ago

Hi Team,

After i have configured this tool. I am not able to understand how do i push the data from External jmeter tests to the analyze section of the tool.

is there any way we can use the Analyze and Online monitor features where the tests are run via command line jmeter tests on a separate machine.

v0devil commented 6 years ago

The proper way to upload result files is now under development. For now, there is the script datagenerator_linux.py which is parsing Jenkins folder and trying to find and parse all jmeter.jtl files. You probably need to adapt this script for your needs because there are some terrible hardcoded things in there. If you provide an example of your result file (few lines) maybe I can help you to Improve this script or add some new functionality in GUI.

rteja91 commented 6 years ago

okay i will take a look into the datagenerator_linux.py, i will provide sample result jtl file for functionality in UI.

i have some idea on django development. if you can guide on this. i can help you on the development of the below functionality for UI

rteja91 commented 6 years ago

i went through datagenerator_linux.py, Please correct if any mistakes in my understanding.

the folder format should be of Jenkins build generation format.

/var/lib/jenkins/jobs/.+?/builds/\d+?/jmeter.jtl

we capture first group regex as Project Name and second as Build # and file name should be jmeter.jtl

if i arrange my jtl files in the above versioning format, this script will readfiles and push data to the database.

is my observation on this script correct? please confirm

v0devil commented 6 years ago

yes, but there are another bad hardcoded places like: df.columns = [ 'response_time', 'url', 'responseCode', 'success', 'threadName', 'failureMessage', 'grpThreads', 'allThreads' ] Also must exist the first column which is the timestamp (like 1515024206805) and this column is defined as index afterward in the code: df.index = pd.to_datetime(dateconv((df.index.values / 1000)))

So if number or order of your columns is different you 'll get error 👎 Actually, from all these columns you need only 4: 'response_time', 'url', 'responseCode', 'success' - all another are useless.

This part of the script must be definitely improved before we can dynamically upload CSV files, so we need to figure out how much columns has CSV file, which separator and what these columns mean.

For Controller, there is a file controller/datagenerator.py which is similar to this one and which must be fixed and used for result files uploading.

rteja91 commented 6 years ago

can you help me with a sample jtl file which the current script is working

v0devil commented 6 years ago

1515027139558,310,placeBuilding_street,200,true,1993,100,100,309 1515027139880,20,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027140198,126,BattlefieldService_start,200,true,7214,100,100,125 1515027140460,66,placeBuilding_street,200,true,1439,100,100,66 1515027140537,23,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027140694,159,BattlefieldService_submitMove,200,true,6552,100,100,159 1515027140976,21,AchievementsService_setTopAchievements,200,true,437,100,100,21 1515027140977,83,OtherPlayerService_visitPlayer,200,true,5944,100,100,82 1515027141323,32,AchievementsService_getOverview,200,true,2754,100,100,32 1515027141338,148,BattlefieldService_submitMove,200,true,6543,100,100,148 1515027141734,1,exclude_startts,200,true,0,100,100,0 1515027141739,36,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027141836,46,FriendsTavernService_getOtherTavernStates,200,true,650,100,100,46 1515027141875,34,AchievementsService_getOverview,200,true,2792,100,100,33 1515027142071,36,AchievementsService_getOverview,200,true,2742,100,100,36 1515027142432,66,CampaignService_getProvinceData,200,true,961,100,100,65 1515027142603,46,FriendsTavernService_upgradeTable,200,true,949,100,100,46 1515027142644,31,ArmyUnitManagementService_getArmyInfo,200,true,599,100,100,31 1515027143008,43,FriendsTavernService_getOtherTavernStates,200,true,718,100,100,43 1515027143785,236,placeBuilding_street,200,true,1786,100,100,236 1515027144033,20,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027144079,34,FriendsTavernService_getOtherTavernStates,200,true,674,100,100,34 1515027144186,19,AchievementsService_setTopAchievements,200,true,437,100,100,19 1515027144287,45,OtherPlayerService_getNeighborList,200,true,2978,100,100,45 1515027144696,61,ResearchService_buyInstantResearchAndUnlock,200,true,1141,100,100,61 1515027144718,85,OtherPlayerService_getFriendsList,200,true,1177,100,100,85 1515027145754,75,CityProductionService_pickupProduction_resedential,200,true,1259,100,100,75 1515027145831,5,exclude_BeanShell Sampler,200,true,0,100,100,0 1515027146203,46,FriendsTavernService_getOwnTavern,200,true,721,100,100,46 1515027146533,45,FriendsTavernService_getOwnTavern,200,true,721,100,100,45 1515027146535,59,FriendsTavernService_unlockChair,200,true,992,100,100,59 1515027146680,40,OtherPlayerService_getFriendsList,200,true,973,100,100,40 1515027147058,39,FriendsTavernService_getOwnTavern,200,true,723,100,100,39 1515027147212,51,ResearchService_useStrategyPoints,200,true,1069,100,100,51 1515027147697,41,FriendsTavernService_getOtherTavernStates,200,true,721,100,100,41 1515027147771,1,exclude_startts,200,true,0,100,100,0 1515027147775,24,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027148966,20,AchievementsService_setTopAchievements,200,true,437,100,100,20 1515027148978,42,FriendService_getFriendSuggestions,200,true,949,100,100,42 1515027149089,20,AchievementsService_setTopAchievements,200,true,437,100,100,20 1515027149182,38,FriendsTavernService_getOwnTavern,200,true,723,100,100,38 1515027149226,35,FriendsTavernService_getOwnTavern,200,true,716,100,100,35 1515027149437,58,CampaignService_getProvinceData,200,true,970,100,100,58 1515027150574,22,AchievementsService_setTopAchievements,200,true,437,100,100,22 1515027150931,41,OtherPlayerService_getNeighborList,200,true,2950,100,100,40 1515027150780,303,placeBuilding_street,200,true,1846,100,100,303 1515027151103,29,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027151418,34,ArmyUnitManagementService_updateUnits,200,true,598,100,100,34 1515027151453,0,exclude_preRecruit,200,true,0,100,100,0 1515027151507,55,ArmyUnitManagementService_updateUnits,200,true,799,100,100,55 1515027151563,0,exclude_preRecruit,200,true,0,100,100,0 1515027151561,66,CampaignService_getProvinceData,200,true,958,100,100,66 1515027151844,68,OtherPlayerService_visitPlayer,200,true,5983,100,100,68 1515027152111,109,OtherPlayerService_polivateRandomBuilding,200,true,1460,100,100,108 1515027152226,70,TradeService_getTradeOffers,200,true,4423,100,100,70 1515027152733,48,FriendsTavernService_upgradeTable,200,true,982,100,100,48 1515027152737,89,OtherPlayerService_polivateRandomBuilding,200,true,1583,100,100,89 1515027153429,29,ArmyUnitManagementService_updateUnits,200,true,599,100,100,29 1515027153459,1,exclude_preRecruit,200,true,0,100,100,0 1515027153532,55,ArmyUnitManagementService_updateUnits,200,true,778,100,100,55 1515027153588,0,exclude_preRecruit,200,true,0,100,100,0 1515027153587,66,CampaignService_start,200,true,23022,100,100,64 1515027153755,0,exclude_startts,200,true,0,100,100,0 1515027153759,23,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027153863,86,OtherPlayerService_getFriendsList,200,true,956,100,100,86 1515027154060,65,CampaignService_start,200,true,22838,100,100,64 1515027154351,62,placeBuilding_street,200,true,1381,100,100,62 1515027154424,23,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027154373,85,OtherPlayerService_polivateRandomBuilding,200,true,1461,100,100,84 1515027154714,309,placeBuilding_street,200,true,1849,100,100,309 1515027155029,39,AchievementsService_getOverview,200,true,2745,100,100,38 1515027155056,24,exclude_pre_placeBuilding_street,200,true,0,100,100,0 1515027155115,74,OtherPlayerService_visitPlayer,200,true,6014,100,100,74 1515027155583,131,BattlefieldService_start,200,true,7277,100,100,130

v0devil commented 6 years ago

I am still waiting for your result file example) I plan to spend today a time to add a button on top of the page to open a modal window where the user can upload his result file.

v0devil commented 6 years ago

Hey there! I added the possibility to upload result files to the front page within the last commit. Example file for upload is in root directory (data_example.csv)