From 1aa2bda575de9d3ac4353e7386e52fd88991f56c Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sun, 26 Apr 2020 11:55:00 -0700 Subject: [PATCH] Search fixes. Add load-testing project. Add using around webclient. --- Agent/Services/Updater.cs | 2 +- Remotely.sln | 14 +++ .../wwwroot/scripts/Commands/WebCommands.js | 10 +- .../scripts/Commands/WebCommands.js.map | 2 +- .../wwwroot/scripts/Commands/WebCommands.ts | 11 ++- Shared/Utilities/CommandLineParser.cs | 59 ++++++++++++ Tests.LoadTester/Program.cs | 93 +++++++++++++++++++ .../Properties/launchSettings.json | 8 ++ Tests.LoadTester/Tests.LoadTester.csproj | 14 +++ 9 files changed, 202 insertions(+), 11 deletions(-) create mode 100644 Shared/Utilities/CommandLineParser.cs create mode 100644 Tests.LoadTester/Program.cs create mode 100644 Tests.LoadTester/Properties/launchSettings.json create mode 100644 Tests.LoadTester/Tests.LoadTester.csproj diff --git a/Agent/Services/Updater.cs b/Agent/Services/Updater.cs index 4f6906e8d..5e6c8611e 100644 --- a/Agent/Services/Updater.cs +++ b/Agent/Services/Updater.cs @@ -120,7 +120,7 @@ public async Task InstallLatestVersion() Logger.Write("Service Updater: Downloading install package."); - var wc = new WebClientEx((int)UpdateTimer.Interval); + using var wc = new WebClientEx((int)UpdateTimer.Interval); var downloadId = Guid.NewGuid().ToString(); var zipPath = Path.Combine(Path.GetTempPath(), "RemotelyUpdate.zip"); diff --git a/Remotely.sln b/Remotely.sln index 0c5560218..9559d8de3 100644 --- a/Remotely.sln +++ b/Remotely.sln @@ -51,6 +51,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Desktop.Win.Wrapper", "Desktop.Win.Wrapper\Desktop.Win.Wrapper.csproj", "{A9967E61-B1BE-4AA5-A33A-99B0B8B5FC2A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.LoadTester", "Tests.LoadTester\Tests.LoadTester.csproj", "{6C25240C-613D-4A86-A04E-784BA6726094}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -193,6 +195,18 @@ Global {A9967E61-B1BE-4AA5-A33A-99B0B8B5FC2A}.Release|x64.Build.0 = Release|Any CPU {A9967E61-B1BE-4AA5-A33A-99B0B8B5FC2A}.Release|x86.ActiveCfg = Release|Any CPU {A9967E61-B1BE-4AA5-A33A-99B0B8B5FC2A}.Release|x86.Build.0 = Release|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Debug|x64.ActiveCfg = Debug|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Debug|x64.Build.0 = Debug|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Debug|x86.ActiveCfg = Debug|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Debug|x86.Build.0 = Debug|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Release|Any CPU.Build.0 = Release|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Release|x64.ActiveCfg = Release|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Release|x64.Build.0 = Release|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Release|x86.ActiveCfg = Release|Any CPU + {6C25240C-613D-4A86-A04E-784BA6726094}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Server/wwwroot/scripts/Commands/WebCommands.js b/Server/wwwroot/scripts/Commands/WebCommands.js index 9f8ac4e04..ed4791bd2 100644 --- a/Server/wwwroot/scripts/Commands/WebCommands.js +++ b/Server/wwwroot/scripts/Commands/WebCommands.js @@ -239,6 +239,7 @@ var commands = [ var key = filter.slice(0, operatorIndex).trim().toLowerCase(); var operator = filter.slice(operatorIndex, valueIndex).trim().toLowerCase(); var value = filter.slice(valueIndex).trim().toLowerCase(); + console.log(`Searching by key ${key}, operator ${operator}, value ${value}`); if (key == "lastonline") { var parsedDate = Date.parse(value); switch (operator) { @@ -261,16 +262,16 @@ var commands = [ else { switch (operator) { case "=": - lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase() === "${value}".toString().toLowerCase() && `; + lambda += `(String(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)])).toLowerCase() === "${value}".toString().toLowerCase() && `; break; case "*": - lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase().search("${value}".toString().toLowerCase()) > -1 && `; + lambda += `(String(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)])).toLowerCase().search("${value}".toString().toLowerCase()) > -1 && `; break; case "!=": - lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase() !== "${value}".toString().toLowerCase() && `; + lambda += `(String(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)])).toLowerCase() !== "${value}".toString().toLowerCase() && `; break; case "!*": - lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase().search("${value}".toString().toLowerCase()) === -1 && `; + lambda += `(String(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)])).toLowerCase().search("${value}".toString().toLowerCase()) === -1 && `; break; case ">": lambda += `parseFloat(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)]) > parseFloat("${value}") && `; @@ -286,6 +287,7 @@ var commands = [ } catch (ex) { AddConsoleOutput("Unable to parse filter. Please check your syntax."); + console.error(ex); return; } lambda = lambda.slice(0, lambda.lastIndexOf(" &&")); diff --git a/Server/wwwroot/scripts/Commands/WebCommands.js.map b/Server/wwwroot/scripts/Commands/WebCommands.js.map index ee1fb5833..4991c41b7 100644 --- a/Server/wwwroot/scripts/Commands/WebCommands.js.map +++ b/Server/wwwroot/scripts/Commands/WebCommands.js.map @@ -1 +1 @@ -{"version":3,"file":"WebCommands.js","sourceRoot":"","sources":["WebCommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGpD,IAAI,QAAQ,GAA0B;IAClC,IAAI,cAAc,CACd,MAAM,EACN;QACI,IAAI,SAAS,CAAC,SAAS,EAAE,2CAA2C,EAAE,QAAQ,CAAC;KAClF,EACD,gDAAgD,EAChD,yCAAyC,EACzC,EAAE,EACF,CAAC,UAAU,EAAE,aAAa,EAAE,EAAE;QAC1B,IAAI,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;QACzD,IAAI,eAAe,CAAC,MAAM,IAAI,CAAC,EAAE;YAC7B,gBAAgB,CAAC,iCAAiC,CAAC,CAAC;YACpD,OAAO;SACV;QAED,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,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,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;gBACxC,MAAM,EAAE,CAAC;aACZ;QACL,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YAC/B,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;YACxC,MAAM,EAAE,CAAC;QACb,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC;YACxC,gBAAgB,CAAC,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QACrH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC,CAAC,CAAA;AAEN,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/Commands/WebCommands.ts b/Server/wwwroot/scripts/Commands/WebCommands.ts index 089d0e32a..ee16bac58 100644 --- a/Server/wwwroot/scripts/Commands/WebCommands.ts +++ b/Server/wwwroot/scripts/Commands/WebCommands.ts @@ -351,7 +351,7 @@ var commands: Array = [ var key = filter.slice(0, operatorIndex).trim().toLowerCase(); var operator = filter.slice(operatorIndex, valueIndex).trim().toLowerCase(); var value = filter.slice(valueIndex).trim().toLowerCase(); - + console.log(`Searching by key ${key}, operator ${operator}, value ${value}`); if (key == "lastonline") { var parsedDate = Date.parse(value); switch (operator) { @@ -374,16 +374,16 @@ var commands: Array = [ else { switch (operator) { case "=": - lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase() === "${value}".toString().toLowerCase() && `; + lambda += `(String(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)])).toLowerCase() === "${value}".toString().toLowerCase() && `; break; case "*": - lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase().search("${value}".toString().toLowerCase()) > -1 && `; + lambda += `(String(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)])).toLowerCase().search("${value}".toString().toLowerCase()) > -1 && `; break; case "!=": - lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase() !== "${value}".toString().toLowerCase() && `; + lambda += `(String(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)])).toLowerCase() !== "${value}".toString().toLowerCase() && `; break; case "!*": - lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase().search("${value}".toString().toLowerCase()) === -1 && `; + lambda += `(String(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)])).toLowerCase().search("${value}".toString().toLowerCase()) === -1 && `; break; case ">": lambda += `parseFloat(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)]) > parseFloat("${value}") && `; @@ -400,6 +400,7 @@ var commands: Array = [ } catch (ex) { AddConsoleOutput("Unable to parse filter. Please check your syntax."); + console.error(ex); return; } lambda = lambda.slice(0, lambda.lastIndexOf(" &&")); diff --git a/Shared/Utilities/CommandLineParser.cs b/Shared/Utilities/CommandLineParser.cs new file mode 100644 index 000000000..d2a72f1db --- /dev/null +++ b/Shared/Utilities/CommandLineParser.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Windows; + +namespace Remotely.Shared.Utilities +{ + public class CommandLineParser + { + private static Dictionary commandLineArgs; + public static Dictionary CommandLineArgs + { + get + { + if (commandLineArgs is null) + { + commandLineArgs = new Dictionary(); + var args = Environment.GetCommandLineArgs(); + for (var i = 1; i < args.Length; i += 2) + { + try + { + var key = args?[i]; + if (key != null) + { + if (!key.Contains("-")) + { + i -= 1; + continue; + } + key = key.Trim().Replace("-", "").ToLower(); + if (i + 1 == args.Length) + { + commandLineArgs.Add(key, "true"); + continue; + } + var value = args[i + 1]; + if (value != null) + { + if (value.StartsWith("-")) + { + commandLineArgs.Add(key, "true"); + i -= 1; + } + else + { + commandLineArgs.Add(key, args[i + 1].Trim()); + } + } + } + } + catch { } + + } + } + return commandLineArgs; + } + } + } +} diff --git a/Tests.LoadTester/Program.cs b/Tests.LoadTester/Program.cs new file mode 100644 index 000000000..ceb22b953 --- /dev/null +++ b/Tests.LoadTester/Program.cs @@ -0,0 +1,93 @@ +using Microsoft.AspNetCore.SignalR.Client; +using Remotely.Shared.Services; +using Remotely.Shared.Utilities; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Remotely.Tests.LoadTester +{ + internal class Program + { + private static void Main(string[] args) + { + Task.Run(ConnectAgents).Wait(); + + Console.Write("Press Enter to exit..."); + Console.ReadLine(); + } + + private static async Task ConnectAgents() + { + try + { + if (!CommandLineParser.CommandLineArgs.ContainsKey("serverurl") || + !CommandLineParser.CommandLineArgs.ContainsKey("organizationid") || + !CommandLineParser.CommandLineArgs.ContainsKey("agentcount")) + { + Console.WriteLine("Command line arguments must include all of the following: "); + Console.WriteLine(); + Console.WriteLine("-serverurl [full URL of the Remotely server]"); + Console.WriteLine(); + Console.WriteLine("-organizationid [organization ID that the device will belong to]"); + Console.WriteLine(); + Console.WriteLine("-agentcount [the number of agent connections to simulate]"); + Console.WriteLine(); + Console.WriteLine("Press Enter to exit..."); + Environment.Exit(0); + } + + var agentCount = int.Parse(CommandLineParser.CommandLineArgs["agentcount"]); + var organizationId = CommandLineParser.CommandLineArgs["organizationid"]; + var serverurl = CommandLineParser.CommandLineArgs["serverurl"]; + var connections = new Dictionary(); + + for (var i = 0; i < agentCount; i++) + { + try + { + var deviceId = Guid.NewGuid().ToString(); + + var hubConnection = new HubConnectionBuilder() + .WithUrl(serverurl + "/DeviceHub") + .Build(); + + Console.WriteLine("Connecting device number " + i.ToString()); + await hubConnection.StartAsync(); + + var device = await DeviceInformation.Create(deviceId, organizationId); + device.DeviceName = "TestDevice-" + Guid.NewGuid(); + + var result = await hubConnection.InvokeAsync("DeviceCameOnline", device); + + if (!result) + { + Console.WriteLine($"Device {i} failed to come online."); + return; + } + + var heartbeatTimer = new System.Timers.Timer(TimeSpan.FromMinutes(1).TotalMilliseconds); + heartbeatTimer.Elapsed += async (sender, args) => + { + var currentInfo = await DeviceInformation.Create(device.ID, organizationId); + currentInfo.DeviceName = device.DeviceName; + await hubConnection.SendAsync("DeviceHeartbeat", currentInfo); + }; + heartbeatTimer.Start(); + } + catch (Exception ex) + { + Console.WriteLine($"Device {i} failed to connect."); + Console.WriteLine(ex.Message); + } + } + } + catch (Exception ex) + { + Console.WriteLine("An error occurred. Check your syntex. Error: "); + Console.WriteLine(); + Console.WriteLine(ex.Message); + } + } + } +} \ No newline at end of file diff --git a/Tests.LoadTester/Properties/launchSettings.json b/Tests.LoadTester/Properties/launchSettings.json new file mode 100644 index 000000000..d429f62dc --- /dev/null +++ b/Tests.LoadTester/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Tests.LoadTester": { + "commandName": "Project", + "commandLineArgs": "-serverurl https://localhost:5001 -organizationid 6b8ff6b6-a5ac-4e38-a022-3b64f2e6b486 -agentcount 1000" + } + } +} \ No newline at end of file diff --git a/Tests.LoadTester/Tests.LoadTester.csproj b/Tests.LoadTester/Tests.LoadTester.csproj new file mode 100644 index 000000000..06745c20e --- /dev/null +++ b/Tests.LoadTester/Tests.LoadTester.csproj @@ -0,0 +1,14 @@ + + + + Exe + netcoreapp3.1 + Remotely.Tests.LoadTester + Remotely.Tests.LoadTester + + + + + + +