For real numbers $t>0$ and $x$, let $f(x)=\sum_{k=1}^Ne^{ikx}$ and $g(t)=\int_{-t}^{t}\lvert f(x)\rvert^2dx$. Then $g(\pi)=\int_{-\pi}^{\pi}\lvert f(x)\rvert^2dx=2\pi N$.
I want to know is there any results about the value of $g(t)$ for small $t$ relevant to $N$. In particular, what is the asymptotic behavior (or just the order) of the value $g\left(\frac{\pi\log N}{N}\right)$?