Which is better for insomnia, diazepam or eszopiclone?

There is no such thing as which is better for insomnia, diazepam or eszopiclone, both diazepam and eszopiclone can be used to treat insomnia and have adverse effects.
Both diazepam and eszopiclone belong to the benzodiazepine class of sedative-hypnotics, and they are both used to treat insomnia. Diazepam can be used for hypnosis, sedation, anti-anxiety, anti-seizure, anticonvulsant and other treatments, for the long-acting sedative-hypnotic drugs; Eszopiclone has the role of treating insomnia, anti-anxiety, overcoming nervousness and anxiety and other bad moods, for the short-acting hypnotic drugs.
Taking diazepam can cause weakness, drowsiness, dyskinesia, hypotension and other symptoms, allergic to diazepam and other benzodiazepines, newborns, pregnant women and lactating women are prohibited; taking eszopiclam may cause dry mouth, body weakness, drowsiness, respiratory depression and other adverse reactions.
Insomniacs should be done under doctor’s supervision whether they use diazepam or eszopiclone.